mirror of
https://github.com/dragonheim/gagent.git
synced 2025-05-24 04:16:47 -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
|
@ -1,11 +1,11 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
bufio "bufio"
|
||||
flag "flag"
|
||||
fmt "fmt"
|
||||
io "io"
|
||||
os "os"
|
||||
|
||||
picol "github.com/dragonheim/gagent/pkg/picol"
|
||||
)
|
||||
|
@ -16,7 +16,7 @@ func RunPicol(fname string) error {
|
|||
interp := picol.NewInterpreter()
|
||||
interp.RegisterCoreCommands()
|
||||
|
||||
buf, err := ioutil.ReadFile(fname)
|
||||
buf, err := io.ReadFile(fname)
|
||||
if err == nil {
|
||||
result, err := interp.Eval(string(buf))
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue