diff --git a/app/config.go b/app/config.go index 2d145e6..b96a6c7 100644 --- a/app/config.go +++ b/app/config.go @@ -2,7 +2,6 @@ package app import ( "encoding/json" - "io/ioutil" "mapserver/layer" "os" "runtime" @@ -132,7 +131,7 @@ func ParseConfig(filename string) (*Config, error) { info, err := os.Stat(filename) if info != nil && err == nil { - data, err := ioutil.ReadFile(filename) + data, err := os.ReadFile(filename) if err != nil { return nil, err } diff --git a/app/setup.go b/app/setup.go index dd64c18..1e1fe22 100644 --- a/app/setup.go +++ b/app/setup.go @@ -19,7 +19,6 @@ import ( "github.com/minetest-go/colormapping" - "io/ioutil" "os" "github.com/sirupsen/logrus" @@ -104,7 +103,7 @@ func Setup(p params.ParamsType, cfg *Config) *App { if info != nil && err == nil { logrus.WithFields(logrus.Fields{"filename": "colors.txt"}).Info("Loading colors from filesystem") - data, err := ioutil.ReadFile("colors.txt") + data, err := os.ReadFile("colors.txt") if err != nil { panic(err) } diff --git a/areasparser/parser.go b/areasparser/parser.go index 558f6e2..3360aa8 100644 --- a/areasparser/parser.go +++ b/areasparser/parser.go @@ -3,7 +3,7 @@ package areasparser import ( "bytes" "encoding/json" - "io/ioutil" + "os" ) type GenericPos struct { @@ -41,7 +41,7 @@ func (pos *GenericPos) UnmarshalJSON(data []byte) error { } func ParseFile(filename string) ([]*Area, error) { - content, err := ioutil.ReadFile(filename) + content, err := os.ReadFile(filename) if err != nil { return nil, err } diff --git a/tiledb/tiledb.go b/tiledb/tiledb.go index c1a5f8e..f1fb111 100644 --- a/tiledb/tiledb.go +++ b/tiledb/tiledb.go @@ -46,7 +46,7 @@ func (this *TileDB) GetTile(pos *coords.TileCoords) ([]byte, error) { _, file := this.getDirAndFile(pos) info, _ := os.Stat(file) if info != nil { - content, err := ioutil.ReadFile(file) + content, err := os.ReadFile(file) if err != nil { panic(err) } diff --git a/travelnetparser/parser.go b/travelnetparser/parser.go index 5a226b3..d6341c2 100644 --- a/travelnetparser/parser.go +++ b/travelnetparser/parser.go @@ -3,8 +3,8 @@ package travelnetparser import ( "errors" "fmt" - "io/ioutil" "mapserver/luaparser" + "os" ) type GenericPos struct { @@ -19,7 +19,7 @@ type Travelnet struct { } func ParseFile(filename string) (map[string]map[string]map[string]*Travelnet, error) { - content, err := ioutil.ReadFile(filename) + content, err := os.ReadFile(filename) if err != nil { return nil, err }