mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Reformat code according to 'gotip' rules.
In practices adds annotations in the new syntax: ``` +//go:build !linux // +build !linux ``` Fixes failing gotip PASSES='fmt' check: https://travis-ci.com/github/etcd-io/etcd/jobs/486453806
This commit is contained in:
@@ -5,9 +5,15 @@ set -e
|
||||
source ./scripts/test_lib.sh
|
||||
source ./scripts/updatebom.sh
|
||||
|
||||
# To fix according to newer version of go:
|
||||
# go get golang.org/dl/gotip
|
||||
# gotip download
|
||||
# GO_CMD="gotip"
|
||||
GO_CMD="go"
|
||||
|
||||
function mod_tidy_fix {
|
||||
run rm ./go.sum
|
||||
run go mod tidy || return 2
|
||||
run ${GO_CMD} mod tidy || return 2
|
||||
}
|
||||
|
||||
function bash_ws_fix {
|
||||
@@ -23,7 +29,7 @@ function bash_ws_fix {
|
||||
log_callout -e "\\nFixing etcd code for you...\\n"
|
||||
|
||||
run_for_modules mod_tidy_fix || exit 2
|
||||
run_for_modules run go fmt || exit 2
|
||||
run_for_modules run ${GO_CMD} fmt || exit 2
|
||||
run_for_module tests bom_fix || exit 2
|
||||
bash_ws_fix || exit 2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user