Upload files in Google Drive with Golang and Google Drive API

In this post we’ll go step by step to uploading a file in Google Drive using Golang and the Google Drive API V3.

Even if the the Google’s documentation is pretty good, I’ve encountered some difficulties in using their API, especially when using Go language.

Before starting to code, please visit https://developers.google.com/drive/api/v3/quickstart/go and enable the drive API for your Google Account (Step 1). You must choose a name for your app (eg: “MyAwesomeApp”) and the type of your app (eg…