File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ package basher
44import (
55 "fmt"
66 "io"
7- "io/ioutil"
87 "log"
98 "os"
109 "os/exec"
@@ -165,12 +164,12 @@ func (c *Context) CopyEnv() {
165164}
166165
167166// Source adds a shell script to the Context environment. The loader argument can be nil
168- // which means it will use ioutil .Readfile and load from disk, but it exists so you
167+ // which means it will use os .Readfile and load from disk, but it exists so you
169168// can use the Asset function produced by go-bindata when including script files in
170169// your Go binary. Calls to Source adds files to the environment in order.
171170func (c * Context ) Source (filepath string , loader func (string ) ([]byte , error )) error {
172171 if loader == nil {
173- loader = ioutil .ReadFile
172+ loader = os .ReadFile
174173 }
175174 data , err := loader (filepath )
176175 if err != nil {
@@ -218,7 +217,7 @@ func (c *Context) HandleFuncs(args []string) bool {
218217}
219218
220219func (c * Context ) buildEnvfile () (string , error ) {
221- file , err := ioutil . TempFile (os .TempDir (), "bashenv." )
220+ file , err := os . CreateTemp (os .TempDir (), "bashenv." )
222221 if err != nil {
223222 return "" , err
224223 }
You can’t perform that action at this time.
0 commit comments