diff --git a/message_readers.go b/message_readers.go index b5c5a47..af1ffec 100644 --- a/message_readers.go +++ b/message_readers.go @@ -4,7 +4,6 @@ import ( "bytes" "fmt" "io" - "io/ioutil" "log" "net" "net/http" @@ -146,7 +145,7 @@ func (s *server) getFilePaths(dirName string) ([]string, error) { } } - fInfo, err := ioutil.ReadDir(dirPath) + fInfo, err := os.ReadDir(dirPath) if err != nil { er := fmt.Errorf("error: failed to get filenames in startup folder: %v", err) return nil, er diff --git a/node_auth.go b/node_auth.go index bde2c34..d67f49e 100644 --- a/node_auth.go +++ b/node_auth.go @@ -6,7 +6,6 @@ import ( "encoding/json" "fmt" "io" - "io/ioutil" "log" "os" "path/filepath" @@ -16,7 +15,7 @@ import ( // nodeAuth is the structure that holds both keys and acl's // that the running steward node shall use for authorization. -//It holds a mutex to use when interacting with the map. +// It holds a mutex to use when interacting with the map. type nodeAuth struct { // ACL that defines where a node is allowed to recieve from. nodeAcl *nodeAcl @@ -361,7 +360,7 @@ func (n *nodeAuth) readKeyFile(keyFile string) (ed2519key []byte, b64Key []byte, } defer fh.Close() - b, err := ioutil.ReadAll(fh) + b, err := io.ReadAll(fh) if err != nil { er := fmt.Errorf("error: failed to read key file: %v", err) return nil, nil, er diff --git a/tui.go b/tui.go index a866d21..97f9e69 100644 --- a/tui.go +++ b/tui.go @@ -7,7 +7,6 @@ import ( "encoding/json" "fmt" "io" - "io/ioutil" "log" "os" "path/filepath" @@ -805,7 +804,7 @@ func (t *tui) console(app *tview.Application) tview.Primitive { // the messages folder. func (t *tui) getMessageNames(outputForm *tview.TextView) []string { // Create messages dropdown field. - fInfo, err := ioutil.ReadDir("messages") + fInfo, err := os.ReadDir("messages") if err != nil { fmt.Fprintf(outputForm, "error: failed to read files from messages dir\n") }