-
Notifications
You must be signed in to change notification settings - Fork 0
/
paramset.go
35 lines (32 loc) · 1.11 KB
/
paramset.go
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
package main
import (
"os"
"github.com/nickwells/param.mod/v6/param"
"github.com/nickwells/param.mod/v6/paramset"
"github.com/nickwells/versionparams.mod/versionparams"
)
// makeParamSet generates the param set ready for parsing
func makeParamSet(prog *Prog) *param.PSet {
return paramset.NewOrPanic(
versionparams.AddParams,
addParams(prog),
addExamples,
SetGlobalConfigFile,
SetConfigFile,
param.SetProgramDescription("This will take a list of go.mod"+
" files (or directories) as trailing arguments"+
" (after '"+param.DfltTerminalParam+"'), parse them and print"+
" a report. The report will show how they relate to one"+
" another with regards to dependencies and can print them in"+
" such an order that an earlier module does not depend on any"+
" subsequent module."+
"\n\n"+
"By default any report will be preceded with a description of"+
" what the various columns mean."+
"\n\n"+
"If a trailing argument does not end with "+
"'"+string(os.PathSeparator)+"go.mod'"+
" then it is taken as a directory name and the missing"+
" filename is automatically appended."),
)
}