gopkg.in/easygen.v4@v4.1.0/cmd/easygen/easygen.yaml (about) 1 # program name, name for the executable 2 ProgramName: easygen 3 4 # package name 5 # - For standalone program that does not belong to any package, e.g., 6 # https://github.com/suntong/easygen/blob/7791e4f0e5605543d27da1671a21376cdb9dcf2a/easygen/easygen.go 7 # just ignore the first line, the `package` output, and copy the rest 8 # - If you don't mind using a separated file to handle commandline paramters, 9 # then name the package as "main". see the spin-out "TF-minus1.go" file under 10 # https://github.com/suntong/easygen/tree/d1ab0b5fe80ddac57fe9ef51f6ccb3ab998cd5ee 11 # - If you are using it in a pacakge, look no further than 12 # https://github.com/suntong/easygen/blob/master/easygenapi/config.go 13 # which was a direct dump: easygen test/commandlineFlag | gofmt > easygenapi/config.go 14 # 15 PackageName: easygen 16 17 # Name of the structure to hold the values for/from commandline 18 StructName: Options 19 # The actual variable that hold the commandline paramter values 20 StructVar: Opts 21 22 Options: 23 24 - Name: TemplateStr 25 Type: string 26 Flag: ts 27 Value: '""' 28 Usage: "template string (in text)" 29 30 - Name: ExtYaml 31 Type: string 32 Flag: ey 33 Value: '".yaml"' 34 Usage: "`extension` of yaml file" 35 36 - Name: ExtJson 37 Type: string 38 Flag: ej 39 Value: '".json"' 40 Usage: "`extension` of json file" 41 42 - Name: ExtTmpl 43 Type: string 44 Flag: et 45 Value: '".tmpl"' 46 Usage: "`extension` of template file" 47 48 - Name: Debug 49 Type: int 50 Flag: debug 51 Value: 0 52 Usage: "debugging `level`" 53 54 # Whether to use the USAGE_SUMMARY in Usage help 55 UsageSummary: "" 56 57 UsageLead: "\\nUsage:\\n %s [flags] template_name [data_filename [data_filename...]]\\n\\nFlags:\\n\\n" 58 59 UsageEnd: "\\ndata_filename(s): The name for the .yaml or .json data.\\n - If omitted derive from the template_name.\\n - Can have the extension or without it. If withot extension,\\n will try .yaml first then .json\\n - Can include the path as well.\\n\\ntemplate_name: The name for the template file.\\n - Can have the extension or without it.\\n - Can include the path as well.\\n - Can be a comma-separated list giving many template files, in which case\\n at least one data_filename must be given.\\n\\nFlag defaults can be overridden by corresponding environment variable, e.g.:\\n EASYGEN_EY=.yml EASYGEN_ET=.tpl easygen ...\\n" 60