cmd/gocharm: generate hooks correctly