Supported Golang GOOS and GOARCH combinations
To get the list of supported GOOS (operating system) and GOARCH (architecture) combinations execute go tool dist list To specify the GOOS and GOARCH attributes in the Bash command line, build the Golang application with GOOS=linux GOARCH=amd64 go build…
x509: certificate signed by unknown authority
I have built a Docker container with a Go application that used the Go AWS SDK. When my program tried to access an S3 bucket I got the error message RequestError: send request failedcaused by: Get https://MY_BUCKET_NAME.s3.amazonaws.com: x509:…
Docker for Windows cannot start: “Hardware assisted virtualization and data execution protection must be enabled in the BIOS”
To start Docker on Windows, Hyper-V and the Hypervisor has to be enabled on Windows. Start a PowerShell window as administrator Enable Hyper-V dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All Enable the Hypervisor bcdedit /set hypervisorlaunchtype…
List the Active Directory groups the user is a member of
To list the Active Directory groups where the current user is a member, execute in the PowerShell window To get the Active Directory groups for another user, replace THE_USER_NAME with the Active directory user name of the person. (New-Object…
Debugging Go programs in Atom
To be able to debug Go programs in Atom, make sure the Go IDE is installed. See Install the Go IDE at Install and set up Go To start debugging select the Debugger tab in the upper right corner of Atom If you get the error message: The debugger is not…
Using Go packages
To use a public package in your Go application add the line to the top of your program to import the package import "github.com/aws/aws-sdk-go/service/s3" If this is the first time you are using the package, the error message appears in the output window…
Your first Go application
Programming in GO is quick and fun. You can write a working, compiled application with a few lines of code. In this example, we will use Visual Studio Code to edit the source code, and we have already configured it to start from the command line with the…
Set directory access in Windows
When you use SetAccessRule() to set access rights on a Windows directory, the user who will get the permission has to be a member of the Administrators group. If the user is not a member of the Administrators group PowerShell shows the error message…
Go language notes
Differences between Go and the “C” type languages Variable declaration int i; // C#var i int = 5 // Goi := 5 // Go Function declaration private int AddNumbers (int a, int b) {...} // C#func addNumbers(a int, b int) int {...} // Go Loops for…
Install and set up Go
Set up the Go development environment Install Git For Mac see Install Git on Macintosh For Windows see Install Git on Windows Install the Go Programming Language Download the Go distribution from The Go Programming Language page and follow…