1.2.4 설치 확인
설치 후에 명령 프롬프트에서 go version을 입력하여 정상적으로 설치되었는지 확인해 보자. go is not recognized as an internal or external command 메시지가 나타나면 환경 설정이 제대로 안 된 것이다. 환경 변수 PATH에 Go 설치 경로가 정상적으로 등록되었는지 다시 한 번 확인해 보자.
C:\>go version
go version go1.4.2 windows/amd64
go 명령을 실행하면 go tool에서 제공하는 기능을 확인할 수 있다. go help [topic]으로는 각 기능에 대한 설명을 볼 수 있다.
C:\> go
Go is a tool for managing Go source code.
Usage:
go command [arguments]
The commands are:
build compile packages and dependencies
clean remove object files
env print Go environment information
fix run go tool fix on packages
fmt run gofmt on package sources
generate generate Go files by processing source
get download and install packages and dependencies
install compile and install packages and dependencies
list list packages
run compile and run Go program
test test packages
tool run specified go tool
version print Go version
vet run go tool vet on packages
Use "go help [command]" for more information about a command.
Additional help topics:
c calling between Go and C
filetype file types
gopath GOPATH environment variable
importpath import path syntax
packages description of package lists
testflag description of testing flags
testfunc description of testing functions
Use "go help [topic]" for more information about that topic.
C:\>go help vet
usage: go vet [-n] [-x] [packages]
Vet runs the Go vet command on the packages named by the import paths.
For more about vet, see 'godoc golang.org/x/tools/cmd/vet'.
For more about specifying packages, see 'go help packages'.
To run the vet tool with specific options, run 'go tool vet'.
The -n flag prints commands that would be executed.
The -x flag prints commands as they are executed.
See also: go fmt, go fix.