From 32e4847bd4be3954733ad2fc2c60bb88a2b0d853 Mon Sep 17 00:00:00 2001 From: Nathan Sullivan Date: Wed, 14 Aug 2019 09:57:23 +1000 Subject: [PATCH] fix ability to use `go test ./...`, by changing the file suffix for the schema template (which is actually part of a different package) avoids the error: can't load package: package github.com/docker/libcompose/hack: found packages main (inline_schema.go) and config (schema_template.go) in /home/nathan/git/cpuid/libcompose/hack Signed-off-by: Nathan Sullivan --- hack/inline_schema.go | 2 +- hack/{schema_template.go => schema_template.go.tmpl} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename hack/{schema_template.go => schema_template.go.tmpl} (100%) diff --git a/hack/inline_schema.go b/hack/inline_schema.go index e1a85467c..b93fca7d8 100644 --- a/hack/inline_schema.go +++ b/hack/inline_schema.go @@ -7,7 +7,7 @@ import ( ) func main() { - t, err := template.New("schema_template.go").ParseFiles("./hack/schema_template.go") + t, err := template.New("schema_template.go").ParseFiles("./hack/schema_template.go.tmpl") if err != nil { panic(err) } diff --git a/hack/schema_template.go b/hack/schema_template.go.tmpl similarity index 100% rename from hack/schema_template.go rename to hack/schema_template.go.tmpl