fix: Replaced ioutil as it was deprecated in Golang.

This commit is contained in:
James Wells 2024-02-09 12:47:17 -08:00
parent 82a964fc50
commit 97c8af8816
Signed by: jwells
GPG key ID: 73196D10B8E65666
18 changed files with 105 additions and 114 deletions

View file

@ -3,8 +3,8 @@ package chaindb
import (
sha256 "crypto/sha256"
fmt "fmt"
ioutil "io/ioutil"
log "log"
os "os"
time "time"
gs "github.com/dragonheim/gagent/internal/gstructs"
@ -70,7 +70,7 @@ func (db *GagentDb) WriteHCL(ChainDBPath string) error {
agentBody.SetAttributeValue("version", cty.StringVal(row.Agent.Shasum))
}
return ioutil.WriteFile(ChainDBPath, f.Bytes(), 0600)
return os.WriteFile(ChainDBPath, f.Bytes(), 0600)
}
/*

View file

@ -1,10 +1,10 @@
package chaindb
import (
"bytes"
"os"
"testing"
"time"
bytes "bytes"
os "os"
testing "testing"
time "time"
gs "github.com/dragonheim/gagent/internal/gstructs"
)