더북(TheBook)

패키지 설치 프로그램은 /usr/local/go에 Go 패키지를 설치하고 /usr/local/go/bin을 $PATH로 등록한다. echo 명령어로 $PATH에 등록된 경로를 확인해 보자.

명령 프롬프트

$ echo $PATH

/usr/local/go/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin

설치가 완료되면 터미널에서 go 명령어를 입력해 정상적으로 설치되었는지 확인해 본다.

명령 프롬프트

$ 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.

신간 소식 구독하기
뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.