Skip to content

Instantly share code, notes, and snippets.

@jayhuang75
Created October 25, 2021 15:53
Show Gist options
  • Select an option

  • Save jayhuang75/1369ae86826cc62417a04af666766858 to your computer and use it in GitHub Desktop.

Select an option

Save jayhuang75/1369ae86826cc62417a04af666766858 to your computer and use it in GitHub Desktop.
go-train-delay-oauth.go
type App struct {
srv *gmail.Service
userEmail string
googleAPIVersion string
db *sqlx.DB
}
func NewApp(userEmail, credential string) *App {
srv, err := newGmailClient(userEmail, credential)
if err != nil {
log.Fatalf("[app] Initial Gmail Client failed : %v", err)
}
app := &App{
srv: srv,
userEmail: userEmail,
googleAPIVersion: "v1",
}
return app
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment