Skip to content

Commit

Permalink
Merge pull request #2 from akarnani/lint
Browse files Browse the repository at this point in the history
address lint issues
  • Loading branch information
akarnani authored Aug 29, 2022
2 parents 132d7c4 + cb272ce commit 4a63989
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
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"

"gopkg.in/yaml.v2"
)
Expand All @@ -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)
}
Expand Down
4 changes: 2 additions & 2 deletions gcal/gcal.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package gcal
import (
"context"
"fmt"
"io/ioutil"
"log"
"os"
"time"

"golang.org/x/oauth2/google"
Expand All @@ -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)
}
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"crypto/sha256"
"errors"
"fmt"
"io/ioutil"
"io"
"log"
"net/http"
"reflect"
Expand All @@ -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")
}
Expand Down

0 comments on commit 4a63989

Please sign in to comment.