Tools, FAQ, Tutorials:
Build and Run "Hello" Go Program
How to Build and Run "Hello" Go Program on Ubuntu?
✍: FYIcenter.com
Hyperledger Fabric framework is written in Go language.
So it is important to learn how build and run Go programs on Ubuntu.
Here are the steps to build and run the "Hello" Go program.
1. Make sure that Go is installed.
$ go version go version go1.11.5 linux/amd64
2. Create a Go working directory
$ mkdir go $ export GOPATH=~/go
3. Create hello.go source code file. Remember to use Ctrl-D to end the input of the "cat" command.
$ cd go $ mkdir src/hello cat > src/hello/hello.go package main import "fmt" func main() { fmt.Printf("Hello world!\n") } ^D
4. Compile and build the executable file.
$ export GOPATH=~/go $ go install hello
5. Run the executable file.
$ bin/hello Hello world!
⇒ Download Hyperledger Fabric Source Code
⇐ Verify Docker Engine on Ubuntu
2020-05-15, 1048🔥, 0💬
Popular Posts:
What is EPUB 2.0 Metadata "dc:identifier" Element? EPUB 2.0 Metadata "dc:identifier" is a required m...
How to pull NVIDIA CUDA Docker Image with the "docker image pull nvidia/cuda" command? If you are ru...
Can Multiple Paragraphs Be Included in a List Item? Yes. You can include multiple paragraphs in a si...
How to validate the id_token signature received from Azure AD v2.0 authentication response? You can ...
Where to find tutorials on API Management Services at Azure Portal? Here is a list of tutorials to a...