goctl 환경
goctl env directive
섹션 제목: “goctl env directive”$ goctl env --helpCheck or edit goctl environment
Usage: goctl env [flags] goctl env [command]
Available 명령s: check Detect goctl env and dependency tools install Goctl env installation
Flags: -f, --force Silent installation of non-existent dependencies -h, --help help for env -v, --verbose Enable log output -w, --write strings Edit goctl environment
Use "goctl env [command] --help" for more information about a command.goctl env
섹션 제목: “goctl env”$ goctl envGOCTL_OS=darwinGOCTL_ARCH=arm64GOCTL_HOME=/Users/sh00414ml/.goctlGOCTL_DEBUG=FalseGOCTL_CACHE=/Users/sh00414ml/.goctl/cacheGOCTL_EXPERIMENTAL=offGOCTL_VERSION=1.6.5PROTOC_VERSION=3.19.4PROTOC_GEN_GO_VERSION=v1.28.0PROTO_GEN_GO_GRPC_VERSION=1.2.0| GOCTL_OS | Empty string | Operating 시스템 |
| GOCTL_ARCH | Empty string | 시스템 아키텍처 |
| GOCTL_HOME | Empty string | goctl 설정 디렉터리 |
| GOCTL_DEBUG | Empty string | 해당 항목의 동작과 사용법을 설명합니다. |
| GOCTL_CACHE | Empty string | 캐시 디렉터리 |
| GOCTL_EXPERIMENTAL | off | Whether 로 활성화 experimental 함수, enumeration values [에서,off] |
| GOCTL_VERSION | Empty string | goctl 버전 |
| PROTOC_VERSION | Empty string | protoc 버전 |
| PROTOC_GEN_GO_VERSION | Empty string | protoc_gen_go 플러그인 버전 |
| PROTO_GEN_GO_GRPC_VERSION | Empty string | protoc_gen_go_grpc 플러그인 버전 |
goctl env 체크 directive
섹션 제목: “goctl env 체크 directive”$ goctl env check --helpDetect goctl env and dependency tools
Usage: goctl env check [flags]
Flags: -h, --help help for check -i, --install Install dependencies if not found
Global Flags: -f, --force Silent installation of non-existent dependencies -v, --verbose Enable log output| i | boolean | 없음 | false | 설치 의존성 |
| force | boolean | 없음 | false | 해당 항목의 동작과 사용법을 설명합니다. |
| verbose | boolean | 없음 | false | Export execution 로그 |
예제:
예제 1: detect goctl 의존성
goctl 环境依赖已经安装
$ goctl env check --verbose[goctl-env]: preparing to check env
[goctl-env]: looking up "protoc"[goctl-env]: "protoc" is installed
[goctl-env]: looking up "protoc-gen-go"[goctl-env]: "protoc-gen-go" is installed
[goctl-env]: looking up "protoc-gen-go-grpc"[goctl-env]: "protoc-gen-go-grpc" is installed
[goctl-env]: congratulations! your goctl environment is ready!goctl 环境依赖未安装
$ goctl env check --verbose[goctl-env]: preparing to check env
[goctl-env]: looking up "protoc"[goctl-env]: "protoc" is not found in PATH
[goctl-env]: looking up "protoc-gen-go"[goctl-env]: "protoc-gen-go" is not found in PATH
[goctl-env]: looking up "protoc-gen-go-grpc"[goctl-env]: "protoc-gen-go-grpc" is not found in PATH
[goctl-env]: check env finish, some dependencies is not found in PATH, you can executecommand 'goctl env check --install' to install it, for details, please execute command'goctl env check --help'예제 2: detect goctl 의존성과 설치 missing 의존성
不静默安装
$ goctl env check --verbose --install[goctl-env]: preparing to check env
[goctl-env]: looking up "protoc"[goctl-env]: "protoc" is not found in PATH[goctl-env]: do you want to install "protoc" [y: YES, n: No]y[goctl-env]: preparing to install "protoc"[goctl-env]: "protoc" is already installed in "/Users/keson/go/bin/protoc"
[goctl-env]: looking up "protoc-gen-go"[goctl-env]: "protoc-gen-go" is not found in PATH[goctl-env]: do you want to install "protoc-gen-go" [y: YES, n: No]y[goctl-env]: preparing to install "protoc-gen-go""protoc-gen-go" installed from cache[goctl-env]: "protoc-gen-go" is already installed in "/Users/keson/go/bin/protoc-gen-go"
[goctl-env]: looking up "protoc-gen-go-grpc"[goctl-env]: "protoc-gen-go-grpc" is not found in PATH[goctl-env]: do you want to install "protoc-gen-go-grpc" [y: YES, n: No]y[goctl-env]: preparing to install "protoc-gen-go-grpc""protoc-gen-go-grpc" installed from cache[goctl-env]: "protoc-gen-go-grpc" is already installed in "/Users/keson/go/bin/protoc-gen-go-grpc"
[goctl-env]: congratulations! your goctl environment is ready!静默安装
$ goctl env check --verbose --install --force[goctl-env]: preparing to check env
[goctl-env]: looking up "protoc"[goctl-env]: "protoc" is not found in PATH[goctl-env]: preparing to install "protoc""protoc" installed from cache[goctl-env]: "protoc" is already installed in "/Users/keson/go/bin/protoc"
[goctl-env]: looking up "protoc-gen-go"[goctl-env]: "protoc-gen-go" is not found in PATH[goctl-env]: preparing to install "protoc-gen-go""protoc-gen-go" installed from cache[goctl-env]: "protoc-gen-go" is already installed in "/Users/keson/go/bin/protoc-gen-go"
[goctl-env]: looking up "protoc-gen-go-grpc"[goctl-env]: "protoc-gen-go-grpc" is not found in PATH[goctl-env]: preparing to install "protoc-gen-go-grpc""protoc-gen-go-grpc" installed from cache[goctl-env]: "protoc-gen-go-grpc" is already installed in "/Users/keson/go/bin/protoc-gen-go-grpc"
[goctl-env]: congratulations! your goctl environment is ready!goctl env 설치 directive
섹션 제목: “goctl env 설치 directive”$ goctl env install --helpGoctl env installation
Usage: goctl env install [flags]
Flags: -h, --help help for install
Global Flags: -f, --force Silent installation of non-existent dependencies -v, --verbose Enable log output| force | boolean | 없음 | false | 해당 항목의 동작과 사용법을 설명합니다. |
| verbose | boolean | 없음 | false | Export execution 로그 |