Skip to content

Commit fbc012a

Browse files
committed
no more compiler error if tags are missing, message instead
1 parent e208758 commit fbc012a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tags.go

+6-5
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@
55

66
package main
77

8-
// cause an error on purpose if not built with correct tags:
9-
var _ = `
10-
##############
8+
import "fmt"
119

10+
// Indicate proper install if tags were missing or cgo is used.
11+
func init() {
12+
fmt.Println(`##############
1213
INSTALL/BUILD ERROR: this file should not be built with cgo or without no_net or no_json tags, please re
1314
install using
1415
1516
CGO_ENABLED=0 go install -trimpath -ldflags="-w -s" -tags no_net,no_json grol.io/grol@latest
1617
17-
##############
18-
`.(int)
18+
##############`)
19+
}

0 commit comments

Comments
 (0)