When you do modifications in
Swarmkit source code, e.g.,
doc.go, sometimes executing “
make” command will show the following errors:
# make fmt doc.go please format Go code with 'gofmt -s'
But executing “
gofmt -s” command on
doc.go seems not take effect:
# gofmt -s doc.go // Package swarmkit implements a framework for task orchestration. package swarmkit # make fmt doc.go please format Go code with 'gofmt -s' make: *** [fmt] Error 1
The solution should be running “
go fmt” command on this file, then the build process is OK:
# go fmt doc.go doc.go # make fmt bin/swarmd ......