Cannot build Caddy ( flag provided but not defined: -asmflags)

I use the following commands and it works:

go get github.com/mholt/caddy/caddy

cd $GOPATH/src/github.com/mholt/caddy

git tag
Use the highest version number (at the moment v0.11.0)

git checkout -b "adding_plugins" "v0.11.0"

go install github.com/mholt/caddy/caddy

Now you have in $GOPATH/bin the compiled caddy file.