diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1ca0431..6b068e7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -17,6 +17,3 @@ jobs: go-version: '1.19' - name: golangci-lint uses: golangci/golangci-lint-action@v3 - with: - # Optional: show only new issues if it's a pull request. The default value is `false`. - only-new-issues: true diff --git a/config.go b/config.go index 6c15a86..2f2b5c0 100644 --- a/config.go +++ b/config.go @@ -1,7 +1,7 @@ package main import ( - "io/ioutil" + "os" "gopkg.in/yaml.v2" ) @@ -13,7 +13,7 @@ type Config struct { } func getConfig() []Config { - f, err := ioutil.ReadFile("config.yml") + f, err := os.ReadFile("config.yml") if err != nil { panic(err) } diff --git a/gcal/gcal.go b/gcal/gcal.go index 35c5b0d..6ab8586 100644 --- a/gcal/gcal.go +++ b/gcal/gcal.go @@ -3,8 +3,8 @@ package gcal import ( "context" "fmt" - "io/ioutil" "log" + "os" "time" "golang.org/x/oauth2/google" @@ -18,7 +18,7 @@ type Client struct { func NewClient() *Client { ctx := context.Background() - b, err := ioutil.ReadFile("credentials.json") + b, err := os.ReadFile("credentials.json") if err != nil { log.Fatalf("Unable to read client secret file: %v", err) } diff --git a/main.go b/main.go index 8f3518a..8cbdd43 100644 --- a/main.go +++ b/main.go @@ -5,7 +5,7 @@ import ( "crypto/sha256" "errors" "fmt" - "io/ioutil" + "io" "log" "net/http" "reflect" @@ -29,7 +29,7 @@ func parseICal(url string) []gocal.Event { defer resp.Body.Close() - b, err := ioutil.ReadAll(resp.Body) + b, err := io.ReadAll(resp.Body) if err != nil { log.Fatal("Failed to read calendar body") }