1
0
mirror of https://github.com/beego/bee.git synced 2025-06-11 13:30:39 +00:00

Refactor code for dlv command

This commit is contained in:
Faissal Elamraoui
2017-03-22 11:42:08 +01:00
parent ad641afb34
commit 72f144baad
2 changed files with 9 additions and 16 deletions

View File

@ -343,17 +343,6 @@ func GoCommand(command string, args ...string) error {
return goBuild.Run()
}
// GoBuild runs the "go build" command on the specified package
func GoBuild(debugname, pkg string) error {
buildFlags := "-ldflags='-linkmode internal'"
args := []string{"-gcflags", "-N -l", "-o", debugname}
if buildFlags != "" {
args = append(args, SplitQuotedFields(buildFlags)...)
}
args = append(args, pkg)
return GoCommand("build", args...)
}
// SplitQuotedFields is like strings.Fields but ignores spaces
// inside areas surrounded by single quotes.
// To specify a single quote use backslash to escape it: '\''