문서의 이전 판입니다!


go

info
namego
full namego
aliasesgo, golang
tagsgo, golang
Go is a tool for managing Go source code.
 
Usage:
 
        go <command> [arguments]
 
The commands are:
 
        bug         start a bug report
        build       compile packages and dependencies
        clean       remove object files and cached files
        doc         show documentation for package or symbol
        env         print Go environment information
        fix         apply fixes suggested by static checkers
        fmt         gofmt (reformat) package sources
        generate    generate Go files by processing source
        get         add dependencies to current module and install them
        install     compile and install packages and dependencies
        list        list packages or modules
        mod         module maintenance
        work        workspace maintenance
        run         compile and run Go program
        telemetry   manage telemetry data and settings
        test        test packages
        tool        run specified go tool
        version     print Go version
        vet         report likely mistakes in packages
 
Use "go help <command>" for more information about a command.
 
Additional help topics:
 
        buildconstraint build constraints
        buildjson       build -json encoding
        buildmode       build modes
        c               calling between Go and C
        cache           build and test caching
        environment     environment variables
        filetype        file types
        goauth          GOAUTH environment variable
        go.mod          the go.mod file
        gopath          GOPATH environment variable
        goproxy         module proxy protocol
        importpath      import path syntax
        modules         modules, module versions, and more
        module-auth     module authentication using go.sum
        packages        package lists and patterns
        private         configuration for downloading non-public code
        testflag        testing flags
        testfunc        testing functions
        vcs             controlling version control with GOVCS
 
Use "go help <topic>" for more information about that topic.
  • go <command> [arguments]
  • go mod init module_name 새로운 프로젝트 시작. go.mod 파일 생성됨
  • go mod tidy 실제로 import 하는 패키지는 go.mod에 추가하고, 쓰지 않는 패키지 정리
  • go mod vendor 외부 의존성 소스 코드를 프로젝트 내부의 vendor/ 디렉토리에 물리적으로 복사
  • go get package_path 패키지 다운로드하고 go.mod에 추가. overloads overloads ||
    go run . ++
  • go build 컴파일
  • go install 패키지 빌드하고 실행파일을 $GOPATH/bin으로 옮김
  • go test 테스트. *_test.go 파일을 찾아서 테스트 실행.
  • go fmt 코드를 Go 표준 스타일로 자동 교정(prettier를 언어 차원에서 제공)
  • go vet 코드의 정적 분석을 통해 잠재적인 실수(오류) 찾음
  • go version 버전 확인
  • go env 환경 설정 확인
  • go clean 객체나 캐시 삭제
  • /home/u613600155/domains/cli.zerotymer.net/public_html/data/attic/go.1771401805.txt.gz
  • 마지막으로 수정됨: 2026/02/18 08:03
  • 저자 writer