open terminal and type
$ go
go command open go shell , now you can run go program, test, check version etc.
[$ terminal ready to read ]
$go build helloGo.go
this line compile go program just like c or c++
$./helloGo
now you can want to see your output
$go run helloGo.go
this line perform all tasks which build or ./ perform. Tasks such as compile or link the output and also execute the program
$go version
go version print version
go version go10.1 linux/amd64
No comments:
Post a Comment