Golang command: Difference between revisions
(Created page with "== Overview == Golang 명령어 내용 정리 == get == <pre> usage: go get [-d] [-f] [-t] [-u] [-v] [-fix] [-insecure] [build flags] [packages] </pre> Get downloads the pack...") |
No edit summary |
||
Line 21: | Line 21: | ||
Verbose. 상세 작업 진행 내역을 보여준다. | Verbose. 상세 작업 진행 내역을 보여준다. | ||
The -v flag enables verbose progress and debug output. | The -v flag enables verbose progress and debug output. | ||
== mod == | |||
<pre> | |||
Usage: | |||
go mod <command> [arguments] | |||
The commands are: | |||
download download modules to local cache | |||
edit edit go.mod from tools or scripts | |||
graph print module requirement graph | |||
init initialize new module in current directory | |||
tidy add missing and remove unused modules | |||
vendor make vendored copy of dependencies | |||
verify verify dependencies have expected content | |||
why explain why packages or modules are needed | |||
</pre> | |||
Go mod provides access to operations on modules. | |||
[[category:golang]] | [[category:golang]] |
Revision as of 11:01, 13 January 2020
Overview
Golang 명령어 내용 정리
get
usage: go get [-d] [-f] [-t] [-u] [-v] [-fix] [-insecure] [build flags] [packages]
Get downloads the packages named by the import paths, along with their dependencies. It then installs the named packages, like 'go install'.
-d
Package 다운로드 만을 한다. 패키지 설치는 하지 않는다. The -d flag instructs get to stop after downloading the packages; that is, it instructs get not to install the packages.
-f
The -f flag, valid only when -u is set, forces get -u not to verify that each package has been checked out from the source control repository implied by its import path.This can be useful if the source is a local fork of the original.
-u
The -u flag instructs get to use the network to update the named packages and their dependencies. By default, get uses the network to check out missing packages but does not use it to look for updates to existing packages.
-v
Verbose. 상세 작업 진행 내역을 보여준다. The -v flag enables verbose progress and debug output.
mod
Usage: go mod <command> [arguments] The commands are: download download modules to local cache edit edit go.mod from tools or scripts graph print module requirement graph init initialize new module in current directory tidy add missing and remove unused modules vendor make vendored copy of dependencies verify verify dependencies have expected content why explain why packages or modules are needed
Go mod provides access to operations on modules.