File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -288,13 +288,16 @@ _has_license() {
288
288
}
289
289
290
290
profile () {
291
- echo " for profiling to work you may need uncomment the code in main.go"
291
+ echo " for profiling to work you may need to uncomment the code in main.go"
292
292
build
293
293
./vouch-proxy -profile
294
294
go tool pprof -http=0.0.0.0:19091 http://0.0.0.0:9090/debug/pprof/profile? seconds=10
295
-
296
295
}
297
296
297
+ gofmt () {
298
+ # segfault's without exec, hmmm
299
+ exec gofmt -w -s .
300
+ }
298
301
299
302
usage () {
300
303
cat << EOF
@@ -303,6 +306,7 @@ usage() {
303
306
$0 build - go build
304
307
$0 install - move binary to ${GOPATH} /bin/vouch
305
308
$0 goget - get all dependencies
309
+ $0 gofmt - gofmt the entire code base
306
310
$0 dbuild - build docker container
307
311
$0 drun [args] - run docker container
308
312
$0 test [./pkg_test.go] - run go tests (defaults to all tests)
325
329
ARG=$1 ;
326
330
327
331
case " $ARG " in
328
- ' run' |' build' |' dbuild' |' drun' |' install' |' test' |' goget' |' gogo' |' watch' |' gobuildstatic' |' coverage' |' stats' |' usage' |' bug_report' |' test_logging' |' license' |' profile' )
332
+ ' run' |' build' |' dbuild' |' drun' |' install' |' test' |' goget' |' gogo' |' watch' |' gobuildstatic' |' coverage' |' stats' |' usage' |' bug_report' |' test_logging' |' license' |' profile' | ' gofmt ' )
329
333
shift
330
334
$ARG $*
331
335
;;
You can’t perform that action at this time.
0 commit comments