Skip to content

Commit

Permalink
Remouve usage of ioutils
Browse files Browse the repository at this point in the history
  • Loading branch information
0x46616c6b committed Apr 2, 2024
1 parent 3999e72 commit 797e434
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"io/ioutil"
"os"

Check failure on line 4 in config.go

View workflow job for this annotation

GitHub Actions / GolangCI

SA1019: "io/ioutil" has been deprecated since Go 1.19: As of Go 1.16, the same functionality is now provided by package [io] or package [os], and those implementations should be preferred in new code. See the specific function documentation for details. (staticcheck)
"time"

"gopkg.in/yaml.v2"
Expand Down Expand Up @@ -48,7 +48,7 @@ func NewConfig() *Config {
func LoadConfig(path *string) (error, *Config) {
cfg := NewConfig()

bytes, err := ioutil.ReadFile(*path)
bytes, err := os.ReadFile(*path)
if err != nil {
return err, cfg
}
Expand Down

0 comments on commit 797e434

Please sign in to comment.