#Getting Started with Azure Blob Service in Go
This example demonstrates how to use the Blob Storage service with Go. If you don't have a Microsoft Azure subscription you can get a FREE trial account here.
##Instructions
###Using Azure Storage Emulator
- Download, install and run the Azure Storage Emulator.
- Get the Azure SDK for Go using command
go get -u github.com/Azure/azure-sdk-for-go
- Get this sample using command
go get -u github.com/Azure-Samples/storage-blob-go-getting-started
- Compile and run the sample.
###Using Storage Service
- Create a storage account through the Azure Portal.
- Set environment variables
AZURE_STORAGE_ACCOUNT_NAME = <ACCOUNT_NAME>
andAZURE_STORAGE_ACCOUNT_KEY = <ACCOUNT_KEY>
. - Get the Azure SDK for Go using command
go get -u github.com/Azure/azure-sdk-for-go
- Get this sample using command
go get -u github.com/Azure-Samples/storage-blob-go-getting-started
- Depending on if you prefer running the sample against Azure or Azure Storage Emulator, comment / uncomment these lines in the blobSamples function in storageExample.go.
credentials, err := getCredentials(emulator)
// credentials, err := getCredentials(account)
- If using the Storage Emulator, verify it is already running.
- Compile and run the sample.
##Find documentation
- About Azure storage accounts
- Get started with Azure Blob - Blob service concepts - This link is for .NET, but the blob service concepts are the same
- Blob Service Concepts
- Blob Service REST API
- Azure Storage Emulator
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.