hi ,my aim is to debug the program ,so I must add the debug flag -gcflags=all='-N -l' in Makefile or other files, and I added it as below, but it does not works
func buildFlags(env build.Environment) (flags []string) {
var ld []string
//flags = append(flags, " -gcflags=all='-N -l' ")//new add
if env.Commit != "" {
ld = append(ld, "-X", "main.gitCommit="+env.Commit)
}
how to add the debug flag -gcflags=all='-N -l' in Makefile or other files?thanks .
hi ,my aim is to debug the program ,so I must add the debug flag -gcflags=all='-N -l' in Makefile or other files, and I added it as below, but it does not works
how to add the debug flag -gcflags=all='-N -l' in Makefile or other files?thanks .