mattermost / mattermost-plugin-google-calendar

Mattermost Google Calendar Plugin
36 stars 35 forks source link

Use of Deprecated function `New` in getting calendar service #19

Closed abdulsmapara closed 4 years ago

abdulsmapara commented 4 years ago

Presently, [1] uses func New(client *http.Client) (*Service, error) to obtain a new calendar service. The function is deprecated as documented in [2]. Instead, the function func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) should be used.

[1] https://github.com/mattermost/mattermost-plugin-google-calendar/blob/master/server/utils.go#L76 [2] https://godoc.org/google.golang.org/api/calendar/v3#New

Deprecated-Function-New-Should-Use-New-Service

hanzei commented 4 years ago

Good catch @abdulsmapara :+1: Are you interested in fixing this?

abdulsmapara commented 4 years ago

Yes, would like to fix this!