File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package main
22
33import (
4- "io/ioutil "
4+ "os "
55
66 "github.com/miekg/dns"
77 "gopkg.in/yaml.v3"
@@ -21,7 +21,7 @@ type ServerDefinition struct {
2121}
2222
2323func (s * Config ) Load (configfile string ) * Config {
24- data , err := ioutil .ReadFile (configfile )
24+ data , err := os .ReadFile (configfile )
2525 if err != nil {
2626 panic (err )
2727 }
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ package main
22
33import (
44 "encoding/json"
5- "io/ioutil "
5+ "os "
66)
77
88type State struct {
@@ -21,7 +21,7 @@ func NewState(fname string) *State {
2121}
2222
2323func (s * State ) Load () * State {
24- data , _ := ioutil .ReadFile (s .filename )
24+ data , _ := os .ReadFile (s .filename )
2525 json .Unmarshal (data , & s )
2626 return s
2727}
@@ -32,7 +32,7 @@ func (s *State) Save() {
3232 }
3333 s .writeRequired = false
3434 jsonString , _ := json .Marshal (s )
35- ioutil .WriteFile (s .filename , jsonString , 0644 )
35+ os .WriteFile (s .filename , jsonString , 0644 )
3636}
3737
3838func (s * State ) SetMaxId (maxid int ) * State {
You can’t perform that action at this time.
0 commit comments