mirror of
https://github.com/dragonheim/gagent.git
synced 2025-04-28 05:38:58 -07:00
fix: Replaced ioutil as it was deprecated in Golang.
This commit is contained in:
parent
82a964fc50
commit
97c8af8816
18 changed files with 105 additions and 114 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue