Skip to content

Commit

Permalink
change: calendar.New is deplicated
Browse files Browse the repository at this point in the history
  • Loading branch information
ShuheiKubota committed Sep 5, 2022
1 parent a1f68f2 commit f55c51d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion uniqal.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"golang.org/x/oauth2/google"
"golang.org/x/xerrors"
"google.golang.org/api/calendar/v3"
"google.golang.org/api/option"
)

// Version is app version
Expand Down Expand Up @@ -255,7 +256,8 @@ func (c globalCmd) Run() error {
return xerrors.Errorf("failed to connect services: %v", err)
}

srv, err := calendar.New(client)
ctx := context.Background()
srv, err := calendar.NewService(ctx, option.WithHTTPClient(client))
if err != nil {
return xerrors.Errorf("failed to retrieve Calendar client: %v", err)
}
Expand Down

0 comments on commit f55c51d

Please sign in to comment.