File: commandlineGoFlags.yaml

package info (click to toggle)
easygen 5.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 848 kB
  • sloc: sh: 14; makefile: 13
file content (103 lines) | stat: -rw-r--r-- 2,195 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# program name, name for the executable
ProgramName: redo
Authors: Myself <me@mine.org>
Since: 2022

# For the complete demo, refer to the finished code at
#   https://github.com/suntong/lang/tree/master/lang/Go/src/sys/go-flags/wireframed
#  and the wiki at
#   https://github.com/go-easygen/easygen/issues/46
#
PackageName: main

Name: redo
Desc: "global option redo"
Text: Redo global option via automatic code-gen
Verbose: true
Version: true

Options:
  - Name: Host
    Type: string
    Flag: H,host
    EnvV: true
    Usage: Host address
    Value: localhost

  - Name: Port
    Type: int
    Flag: p,port
    EnvV: true
    Usage: Listening port
    Value: 80

  - Name: Force
    Type: bool
    Flag: f,force
    EnvV: true
    Usage: Force start


Command:

  - Name: build
    Desc: "Build the network application"
    Text: 'Usage:\n  redo build [Options] Arch(i386|amd64)'
    
    Options:
      - Name: Dir
        Type: string
        Flag: dir
        Value: "./"
        Usage: source code root dir

  - Name: install
    Desc: "Install the network application"
    Text: 'The add command adds a file to the repository. Use -a to add all files'
    
    Options:
      - Name: Dir
        Type: string
        Flag: d
        Value: "./"
        Usage: source code root dir

      - Name: Suffix
        Type: string
        Flag: suffix
        Value: ".go,.c,.s"
        Usage: "source file suffix"

  - Name: publish
    Desc: Publish the network application
    Text: Publish the built network application to central repo

    Options:
      - Name: Dir
        Type: string
        Flag: 'd,dir'
        Usage: publish dir
        Required: true

      - Name: Suffix
        Type: '[]string'
        Flag: s,suffix
        Usage: "source file suffix for publish"
        Choices:
          - .go
          - .c
          - .h

      - Name: Out
        Type: string
        Flag: o,out
        Usage: "output filename"

      - Name: Args
        Args: |-
          // Example of positional arguments
          //  	Args struct {
          //  	  ID   string
          //  	  Num  int
          //  	  Rest []string
          //  	} `positional-args:"yes" required:"yes"`