From bbaed78064f4d7847914698380e1ed79a14524f5 Mon Sep 17 00:00:00 2001 From: Tony Worm Date: Sun, 10 Jul 2022 00:55:55 -0400 Subject: [PATCH] some help wordsmithing --- .hof/shadow/Cli/cmd/hof/cmd/gen.go | 15 +++++++-------- cmd/hof/cmd/gen.go | 15 +++++++-------- design/cli/cmds/gen.cue | 15 +++++++-------- 3 files changed, 21 insertions(+), 24 deletions(-) diff --git a/.hof/shadow/Cli/cmd/hof/cmd/gen.go b/.hof/shadow/Cli/cmd/hof/cmd/gen.go index 5d7dcf692..7ad06c982 100644 --- a/.hof/shadow/Cli/cmd/hof/cmd/gen.go +++ b/.hof/shadow/Cli/cmd/hof/cmd/gen.go @@ -9,22 +9,21 @@ import ( "github.com/hofstadter-io/hof/cmd/hof/flags" ) -var genLong = `hof gen joins CUE with Go's text/template system and diff3 +var genLong = `hof unifies CUE with Go's text/template system and diff3 create on-liners to generate any file from any data build reusable and modular generators edit and regenerate those files while keeping changes -If no generator is specified, hof gen runs in adhoc mode. - # Render a template -hof gen data.cue -T template.txt -hof gen data.yaml schema.cue -T template.txt > output.txt + hof gen data.cue -T template.txt + hof gen data.yaml schema.cue -T template.txt > output.txt # Add partials to the template context -hof gen data.cue -T template.txt -P partial.txt + hof gen data.cue -T template.txt -P partial.txt # The template flag as code gen mappings -hof gen data.cue ... + + hof gen data.cue -T ... # Generate multiple templates at once -T templateA.txt -T templateB.txt @@ -65,7 +64,7 @@ hof gen data.cue ... hof gen app.cue -G frontend -G backend -G migrations https://docs.hofstadter.io/first-example/ -# You can mix adhof with generators by using +# You can mix adhoc with generators by using # both the -G and -T/-P flags` func init() { diff --git a/cmd/hof/cmd/gen.go b/cmd/hof/cmd/gen.go index f3090b279..392caa1cf 100644 --- a/cmd/hof/cmd/gen.go +++ b/cmd/hof/cmd/gen.go @@ -11,22 +11,21 @@ import ( "github.com/hofstadter-io/hof/lib/gen" ) -var genLong = `hof gen joins CUE with Go's text/template system and diff3 +var genLong = `hof unifies CUE with Go's text/template system and diff3 create on-liners to generate any file from any data build reusable and modular generators edit and regenerate those files while keeping changes -If no generator is specified, hof gen runs in adhoc mode. - # Render a template -hof gen data.cue -T template.txt -hof gen data.yaml schema.cue -T template.txt > output.txt + hof gen data.cue -T template.txt + hof gen data.yaml schema.cue -T template.txt > output.txt # Add partials to the template context -hof gen data.cue -T template.txt -P partial.txt + hof gen data.cue -T template.txt -P partial.txt # The template flag as code gen mappings -hof gen data.cue ... + + hof gen data.cue -T ... # Generate multiple templates at once -T templateA.txt -T templateB.txt @@ -67,7 +66,7 @@ hof gen data.cue ... hof gen app.cue -G frontend -G backend -G migrations https://docs.hofstadter.io/first-example/ -# You can mix adhof with generators by using +# You can mix adhoc with generators by using # both the -G and -T/-P flags` func init() { diff --git a/design/cli/cmds/gen.cue b/design/cli/cmds/gen.cue index 0a39d6da7..9a7560fbe 100644 --- a/design/cli/cmds/gen.cue +++ b/design/cli/cmds/gen.cue @@ -96,22 +96,21 @@ import ( } GenLongHelp: """ -hof gen joins CUE with Go's text/template system and diff3 +hof unifies CUE with Go's text/template system and diff3 create on-liners to generate any file from any data build reusable and modular generators edit and regenerate those files while keeping changes -If no generator is specified, hof gen runs in adhoc mode. - # Render a template -hof gen data.cue -T template.txt -hof gen data.yaml schema.cue -T template.txt > output.txt + hof gen data.cue -T template.txt + hof gen data.yaml schema.cue -T template.txt > output.txt # Add partials to the template context -hof gen data.cue -T template.txt -P partial.txt + hof gen data.cue -T template.txt -P partial.txt # The template flag as code gen mappings -hof gen data.cue ... + + hof gen data.cue -T ... # Generate multiple templates at once -T templateA.txt -T templateB.txt @@ -152,6 +151,6 @@ hof gen data.cue ... hof gen app.cue -G frontend -G backend -G migrations https://docs.hofstadter.io/first-example/ -# You can mix adhof with generators by using +# You can mix adhoc with generators by using # both the -G and -T/-P flags """