Skip to content

Commit

Permalink
refactor: fix deprecated ioutil.ReadFile api call
Browse files Browse the repository at this point in the history
  • Loading branch information
p5nbTgip0r committed Feb 18, 2023
1 parent e1e0c71 commit 6783482
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package main
import (
"flag"
"github.com/rs/zerolog/log"
"io/ioutil"
"os"
"twitch-nightscout/bot"
"twitch-nightscout/config"
Expand All @@ -14,7 +13,7 @@ func main() {
var configPath string
flag.StringVar(&configPath, "config", "config.yaml", "config file")

data, err := ioutil.ReadFile(configPath)
data, err := os.ReadFile(configPath)
if os.IsNotExist(err) {
wrote, err := config.WriteExampleConfig(configPath)
switch {
Expand Down

0 comments on commit 6783482

Please sign in to comment.