diff options
| author | Shulhan <ms@kilabit.info> | 2019-05-19 19:17:22 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2019-05-19 19:17:22 +0700 |
| commit | 1571f0517c11c99e28917f1f6415e2c3ff539583 (patch) | |
| tree | 1e1f90ecd462048153ab68dd5956a959755cb715 | |
| parent | a232a665a45b420f415bcf9972551019c5e24539 (diff) | |
| download | ciigo-1571f0517c11c99e28917f1f6415e2c3ff539583.tar.xz | |
all: fix the main generate directive to use "+build ignore"
The latest change on Go tip [1] somehow make the "go generate" with
"+build generate" on main package cause an error,
can't load package: package github.com/shuLhan/ciigo: found packages ciigo (ciigo.go) and main (generate_main.go) in /home/ms/go/src/github.com/shuLhan/ciigo
From the source code of Go itself, seems like the correct directive
is "+build ignore" instead of "+build generate".
[1] https://github.com/golang/go/issues/31920
| -rw-r--r-- | generate.go | 4 | ||||
| -rw-r--r-- | generate_main.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/generate.go b/generate.go index df0cb95..c1e3cc0 100644 --- a/generate.go +++ b/generate.go @@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package ciigo - //go:generate go run generate_main.go +package ciigo + import ( "log" "os" diff --git a/generate_main.go b/generate_main.go index b458e64..61c5bed 100644 --- a/generate_main.go +++ b/generate_main.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build generate +// +build ignore package main |
