googleworkspace / go-samples

Go samples for Google Workspace APIs
Apache License 2.0
215 stars 100 forks source link

Move file close defers to AFTER we check if the file was successfully created #13

Closed asrivas closed 6 years ago

asrivas commented 6 years ago

In the quickstarts, move the defer to after the file creation error is checked, just like: https://blog.golang.org/defer-panic-and-recover

asrivas commented 6 years ago

Note: @y-yagi took care of the tasks quickstart in: https://github.com/gsuitedevs/go-samples/pull/11

grant commented 6 years ago

Are you going to replace oauth2.NoContext too?

asrivas commented 6 years ago

I'll change the contexts in a separate PR. Let's keep the scope to defers for this one -- thanks!