Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
goyalmunish committed Nov 12, 2022
1 parent 59a2af3 commit d506a1b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions cmd/reminder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ func Flow() {
utils.PrintError(err)
// read and parse the existing data
reminderData := *model.ReadDataFile(defaultDataFilePath)
// TEMP START
// initialize Google Calendar
model.FetchCalendar()
// TEMP END
// print data stats
fmt.Println(reminderData.Stats())
// try automatic backup
Expand Down
1 change: 1 addition & 0 deletions dev_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- [Format Files](#format-files)
- [Linting Code](#linting-code)
- [Build and Push the Docker Image](#build-and-push-the-docker-image)
- [Integrating with Google Calendar API](#integrating-with-google-calendar-api)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

Expand Down
5 changes: 4 additions & 1 deletion internal/model/calendar.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ func saveToken(path string, token *oauth2.Token) {
log.Fatalf("Unable to cache oauth token: %v", err)
}
defer f.Close()
json.NewEncoder(f).Encode(token)
err = json.NewEncoder(f).Encode(token)
if err != nil {
log.Fatalf("Unable to encode token: %v", err)
}
}

// Get Calendar Service.
Expand Down

0 comments on commit d506a1b

Please sign in to comment.