diff --git a/generate/main.go b/generate/main.go new file mode 100644 index 000000000..25453ab83 --- /dev/null +++ b/generate/main.go @@ -0,0 +1,13 @@ +package main + +//go:generate go run ../generate + +// This should not be included in any release of pelican + +// Include more generator functions here but keep them encapsulated +// in their separate files under `generate` package +func main() { + GenParamEnum() + GenParamStruct() + GenPlaceholderPathForNext() +} diff --git a/generate/next_generator.go b/generate/next_generator.go index cf90ffbf4..19ba64176 100644 --- a/generate/next_generator.go +++ b/generate/next_generator.go @@ -1,5 +1,7 @@ package main +// This should not be included in any release of pelican + import ( "log" "os" diff --git a/generate/param_generator.go b/generate/param_generator.go index 816a907be..e7f1cd930 100644 --- a/generate/param_generator.go +++ b/generate/param_generator.go @@ -25,12 +25,6 @@ type TemplateData struct { GeneratedCode string } -func main() { - GenParamEnum() - GenParamStruct() - GenPlaceholderPathForNext() -} - var requiredKeys = [3]string{"description", "default", "type"} func GenParamEnum() { diff --git a/param/param.go b/param/param.go index 347522362..9d728b678 100644 --- a/param/param.go +++ b/param/param.go @@ -7,8 +7,6 @@ import ( "github.com/spf13/viper" ) -//go:generate go run ../generate - var ( viperConfig *config configMutex sync.RWMutex