Execution environment test after Go language installation

final confirmation

After installation and version confirmation Create a folder with VSCord and test until you get the expected results Click here to build Go language environment

Execution environment test

#Create a test directory
$ mkdir -p ~/go/src/test

#Move to directory
$ cd ~/go/src/test

#Create a test file
$ touch test.go

#Edit test file
$ vi test.go

//test.go

package main

import "fmt"

func main() {
    fmt.Printf("test, go\n")
}
#Move to the created directory
$ cd ~/go/src/hello

#Build and generate binary file
$ go build

Save with: wq, build and generate binary file

Execute

$ ./test
test, go

* If an error occurs

$ go env

Should I check the environment variables related to Go language and check around PATH?

* Applies output results

If you change the content output in the test, you need to overwrite it, so build again

$ go build

Now that I've passed the test, I'm going to start studying Go! !!

Recommended Posts

Execution environment test after Go language installation
Go language environment construction
[Go] Execution / build / package test
[MacOS] Installation of Go (Go language) using goenv
Create execution environment for each language with boot2docker
[Python] Chapter 01-02 About Python (Execution and installation of development environment)
Scripting language mutual execution
Go language learning record
Go language cheat sheet
Features of Go language
Anaconda3 environment installation procedure
Scrapy environment installation procedure
Environment construction, simple confirmation and skill test for each language