Go Official Documentation Go Doc Go Standard Library Go Package Search Learn Go Go By Example Learn Go in Y Minutes Go Web by Example - simple web development examples using golang TutorialEdge: Basic Golang Gophercises Golang Weekly Go Collectives on StackOverflow GoLang Mobile Go101 - best …
Read MoreCreate location of your go code 1~$ mkdir /mnt/c/learning/go Get the suggested golang init script It is in separate post in my quicktasks and don't forget to make it executable. For this quicktask, I assume you named it init.sh as well. Create and go to project directory 1~$ mkdir local_module_example 2~$ cd …
Read MoreSuggested Init Script The very basic variable you need to lookout for in go is the environment variable $GOPATH. In Unix/Linux-based systems it is by default in ~/go. My preference is to put it in a directory where my go code exists. So here's a short shell script I use: 1#!/bin/bash 2 3## Enforce calling …
Read MoreIn your preferred directory, initialize GOPATH using the short script in Suggested GoLang Init Script. Then, do the following steps: Install godoc 1~$ go install golang.org/x/tools/cmd/godoc@latest 2go: downloading golang.org/x/tools v0.1.7 3go: downloading golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e 4go: …
Read More1~$ mkdir greetings 2~$ cd greetings 3~$ go mod init example.com/greetings In a text editor, create greetings.go with the following content: 1package greetings 23import "fmt" 45// Hello returns a greeting for the named person. 6func Hello(name string) string { 7// Return a greeting that embeds the name in a …
Read More