diff --git a/init/config/README.md b/init/config/README.md index 3b95a2e..8623eb7 100644 --- a/init/config/README.md +++ b/init/config/README.md @@ -1,6 +1,6 @@ # Unpackerr Configuration Generator -This folder contains a [yaml](conf-builder.yml) file that describes the entire Unpackerr configuration. +This folder contains a [yaml](definitions.yml) file that describes the entire Unpackerr configuration. This description includes all variables, their defaults, their recommendations, comments and documentation. ## Builders diff --git a/init/config/compose-builder.go b/init/config/compose.go similarity index 98% rename from init/config/compose-builder.go rename to init/config/compose.go index 95401fc..6026039 100644 --- a/init/config/compose-builder.go +++ b/init/config/compose.go @@ -8,6 +8,8 @@ import ( "strings" ) +/* This file creates an example compose file: docker-compose.yml */ + //nolint:lll const ( space = " " diff --git a/init/config/conf-builder.go b/init/config/config.go similarity index 100% rename from init/config/conf-builder.go rename to init/config/config.go diff --git a/init/config/conf-builder.yml b/init/config/definitions.yml similarity index 100% rename from init/config/conf-builder.yml rename to init/config/definitions.yml diff --git a/init/config/docs-builder.go b/init/config/docusaurus.go similarity index 97% rename from init/config/docs-builder.go rename to init/config/docusaurus.go index c89b9ec..a93015a 100644 --- a/init/config/docs-builder.go +++ b/init/config/docusaurus.go @@ -13,6 +13,8 @@ import ( "github.com/BurntSushi/toml" ) +/* This file creates a folder full of docusaurus markdown files for https://unpackerr.zip */ + func printDocusaurus(config *Config, output string) { // Generate index file first. if err := makeGenerated(config, output); err != nil { diff --git a/init/config/main.go b/init/config/main.go index 756e661..a432827 100644 --- a/init/config/main.go +++ b/init/config/main.go @@ -1,4 +1,4 @@ -//go:generate go run . --config ../../examples/unpackerr.conf.example --compose ../../examples/docker-compose.yml --type config,compose --file conf-builder.yml +//go:generate go run . --config ../../examples/unpackerr.conf.example --compose ../../examples/docker-compose.yml --type config,compose --file definitions.yml package main @@ -27,7 +27,7 @@ const ( opTimeout = 6 * time.Second ) -//go:embed conf-builder.yml +//go:embed definitions.yml var confBuilder []byte type section string @@ -88,7 +88,7 @@ func main() { defer file.Close() config := &Config{} - // Decode conf-builder file into Go data structure. + // Decode definitions file into Go data structure. if err = yaml.NewDecoder(file).Decode(config); err != nil { log.Fatalln(err) //nolint:gocritic } @@ -127,9 +127,9 @@ func parseFlags() *flags { flag.StringVar(&flags.Compose, "compose", exampleCompose, "Choose a filename for the generated docker compose service.") flag.StringVar(&flags.Docs, "docs", outputDir, - "Choose folder for generated documentation. ") + "Choose folder for generated documentation.") flag.StringVarP(&flags.File, "file", "f", "internal", - "URL or filepath for conf-builder.yml, internal uses the compiled-in file") + "URL or filepath for definitions.yml, 'internal' uses the compiled-in file.") flag.Parse() return &flags