Skip to content

Commit aa312c1

Browse files
committed
Fix
Signed-off-by: Kevin Zhang <[email protected]>
1 parent 591500e commit aa312c1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gen.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ func loadPackage(path string, buildFirst bool, buildTags string) (*packages.Pack
9494
if buildFirst {
9595
args := []string{"build", "-v", "path"}
9696
if buildTags != "" {
97-
args = append(args, "-tags", buildTags)
97+
buildTagStr := fmt.Sprintf("\"%s\"", strings.Join(strings.Split(buildTags, ","), ""))
98+
args = append(args, "-tags", buildTagStr)
9899
}
99100
fmt.Printf("go %v\n", strings.Join(args, " "))
100101
cmd := exec.Command("go", args...)

0 commit comments

Comments
 (0)