fix: changed db destination to programatic instead of hardcoded.

fix: minor cleanup.

feat: cleaned up agent hint collection.
This commit is contained in:
James Wells 2023-03-28 13:23:09 -07:00
parent 13d18d7714
commit 2b0975b30a
Signed by: jwells
GPG key ID: 73196D10B8E65666
3 changed files with 16 additions and 9 deletions

View file

@ -50,7 +50,7 @@ func (db *GagentDb) LoadHCL(ChainDBPath string) error {
/*
* Write the database to an HCL file
*/
func (db *GagentDb) WriteHCL() error {
func (db *GagentDb) WriteHCL(ChainDBPath string) error {
f := hclwrite.NewEmptyFile()
rootBody := f.Body()
@ -69,7 +69,7 @@ func (db *GagentDb) WriteHCL() error {
agentBody.SetAttributeValue("version", cty.StringVal(row.Agent.Shasum))
}
return ioutil.WriteFile("chaindb_out.hcl", f.Bytes(), 0600)
return ioutil.WriteFile(ChainDBPath, f.Bytes(), 0600)
}
/*