[SOLVED] Wanting to add a function to tpl/template_functions.go

Okay thanks @bep for your $GOPATH remark. This is it. Actually I had my forked repository somewhere else, but $GOPATH/src/github.com/spf13/hugo was well cloned from the main source. I made it with symlinks:

~/dev/go/hugo/$ echo $GOPATH
/my-user-home/dev/go
~/dev/go/hugo/$ rm -r ~/dev/go/src/github.com/spf13/hugo/
~/dev/go/hugo/$ ln -s ~/dev/go/hugo/ ~/dev/go/src/github.com/spf13/hugo

And then:

~/dev/go/hugo$ go build
# github.com/spf13/hugo/hugolib 
../src/github.com/spf13/hugo/hugolib/widget.go:25: syntax error: non-declaration statement outside function body

Now I can start working!