use safer module dir
This commit is contained in:
parent
3b0fa9ff1e
commit
7ed227beb3
9
Makefile
9
Makefile
@ -6,12 +6,11 @@ version = $(date)-$(shell git rev-parse --short HEAD)
|
|||||||
|
|
||||||
default: build
|
default: build
|
||||||
|
|
||||||
lib: $(sources) iniparser.gen.go docreflect.gen.go
|
|
||||||
go build
|
|
||||||
go build ./tools
|
|
||||||
|
|
||||||
build: lib .build/wand .build/wand.1 cmd/wand/readme.md
|
build: lib .build/wand .build/wand.1 cmd/wand/readme.md
|
||||||
|
|
||||||
|
lib: $(sources) iniparser.gen.go docreflect.gen.go
|
||||||
|
go build ./...
|
||||||
|
|
||||||
check: $(sources) build docreflect_test.go
|
check: $(sources) build docreflect_test.go
|
||||||
go test -count 1 ./...
|
go test -count 1 ./...
|
||||||
|
|
||||||
@ -47,7 +46,7 @@ docreflect_test.go: $(sources)
|
|||||||
.build:
|
.build:
|
||||||
mkdir -p .build
|
mkdir -p .build
|
||||||
|
|
||||||
.build/wand: $(sources) iniparser.gen.go docreflect.gen.go .build
|
.build/wand: $(sources) lib iniparser.gen.go docreflect.gen.go lib .build
|
||||||
go build \
|
go build \
|
||||||
-o .build/wand \
|
-o .build/wand \
|
||||||
-ldflags "-X main.version=$(version)" \
|
-ldflags "-X main.version=$(version)" \
|
||||||
|
|||||||
@ -2,10 +2,9 @@
|
|||||||
Generated with https://code.squareroundforest.org/arpio/docreflect
|
Generated with https://code.squareroundforest.org/arpio/docreflect
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package wand
|
package wand
|
||||||
|
|
||||||
import "code.squareroundforest.org/arpio/docreflect"
|
import "code.squareroundforest.org/arpio/docreflect"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
docreflect.Register("code.squareroundforest.org/arpio/wand/tools", "Package tools provides tools to work with the wand library. The functions in this package serve primarily as\nthe implementation of the wand executable command.\n")
|
docreflect.Register("code.squareroundforest.org/arpio/wand/tools", "Package tools provides tools to work with the wand library. The functions in this package serve primarily as\nthe implementation of the wand executable command.\n")
|
||||||
docreflect.Register("code.squareroundforest.org/arpio/wand/tools.Docreflect", "Docreflect generates documentation from the go docs of a package to be included in the compiled binary and\nto be accessed by the automatic help and documentation generator.\n\nThe packageName parameter specifies the package name for the generated Go code.\n\nThe gopath arguments accept any number of package, package level symbol, or struct field paths. It is\nrecommended to use package paths unless there are special circumstances.\n\nfunc(o, out, packageName, gopaths)")
|
docreflect.Register("code.squareroundforest.org/arpio/wand/tools.Docreflect", "Docreflect generates documentation from the go docs of a package to be included in the compiled binary and\nto be accessed by the automatic help and documentation generator.\n\nThe packageName parameter specifies the package name for the generated Go code.\n\nThe gopath arguments accept any number of package, package level symbol, or struct field paths. It is\nrecommended to use package paths unless there are special circumstances.\n\nfunc(o, out, packageName, gopaths)")
|
||||||
|
|||||||
@ -146,7 +146,7 @@ func hash(expression string, imports []string) (string, error) {
|
|||||||
return "", fmt.Errorf("failed to complete encoding of expression: %w", err)
|
return "", fmt.Errorf("failed to complete encoding of expression: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return strings.TrimPrefix(buf.String(), "_"), nil
|
return "w" + strings.TrimPrefix(buf.String(), "_"), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func printGoFile(fn string, expression string, imports []string) error {
|
func printGoFile(fn string, expression string, imports []string) error {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user