start go 1.14 changes

This commit is contained in:
Paul Seyfert 2020-03-02 15:06:57 +01:00
parent a6e641b977
commit 65c9fd6e88
1 changed files with 11 additions and 0 deletions

View File

@ -95,6 +95,7 @@ case $state in
'-n[print the commands but do not run them]'
'-p[number of builds that can be run in parallel]:number'
'-race[enable data race detection]'
'-msan[enable interoperation with memory sanitizer]'
'-v[print the names of packages as they are compiled]'
'-work[print temporary work directory and keep it]'
'-x[print the commands]'
@ -111,6 +112,11 @@ case $state in
'-trimpath[remove all file system paths from the resulting executable]'
'-toolexec[program to use to invoke toolchain programs]:args'
)
mod_flags=(
'-mod=[module download mode to use]:download mode:(readonly vendor mod)'
'-modcacherw[leave newly-created directories in the module cache read-write]'
'-modfile=[read an alternate go.mod file]:modfile: _files -g "*.mod"'
)
__go_packages() {
local gopaths
@ -138,6 +144,7 @@ case $state in
'-o[force build to write to named output file or directory]:file or directory:_files' \
'-i[installs the packages that are dependencies of the target]' \
${build_flags[@]} \
${mod_flags[@]} \
'*:importpaths:__go_packages'
;;
@ -146,6 +153,7 @@ case $state in
'-i[remove corresponding installed archive or binary]' \
'-r[apply clean recursively on all dependencies]' \
${build_flags[@]} \
${mod_flags[@]} \
'*:importpaths:__go_packages'
;;
@ -242,6 +250,7 @@ case $state in
'-t[also download the packages required to build tests]' \
'-u[use the network to update the named packages]' \
${build_flags[@]} \
# no mod_flags for get
'*:importpaths:__go_packages'
;;
@ -730,6 +739,8 @@ case $state in
'importpath:import path syntax'
'modules:modules, module versions, and more'
'module-get:module-aware go get'
'module-auth:module authentication using go.sum'
'module-private:module configuration for non-public modules'
'packages:package lists and patterns'
'testflag:testing flags'
'testfunc:testing functions'