diff options
| author | Jeff Carr <[email protected]> | 2023-12-20 15:12:26 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-12-20 15:12:26 -0600 |
| commit | bb662ccd82cbf07742896075127920493c1a4aaf (patch) | |
| tree | 5f51893e5ba935ed24dfa2ed95dd69e4d92fe8dc /dnssecsocket/args.go | |
| parent | 4c3be58461858c511a25da62e63e29c9b90a63a6 (diff) | |
rename to go.wit.com/control-panel-dnsv0.2.0
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'dnssecsocket/args.go')
| -rw-r--r-- | dnssecsocket/args.go | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/dnssecsocket/args.go b/dnssecsocket/args.go new file mode 100644 index 0000000..cbd9fe7 --- /dev/null +++ b/dnssecsocket/args.go @@ -0,0 +1,44 @@ +package dnssecsocket + +// +// By using the package "github.com/alexflint/go-arg", +// these can be configured from the command line +// + +import ( + // arg "github.com/alexflint/go-arg" + // "log" + // "os" +) + +type Args struct { + VerboseDnssec bool `arg:"--verbose-dnssec" help:"debug dnssec lookups"` + Foo string `arg:"env:USER"` +} + +var args struct { + Args + Verbose bool +} + +func Parse (b bool) { + args.Verbose = b + args.VerboseDnssec = b +} + +// I attempted to pass the *arg.Parser down +// to see if I could find the value somewhere but I couldn't find it +/* +var conf arg.Config + +func Parse (p *arg.Parser) { + // conf.Program = "control-panel-dns" + // conf.IgnoreEnv = false + // arg.NewParser(conf, &args) + log.Println("fuckit", p, args.VerboseDnssec) + for i, v := range p.SubcommandNames() { + log.Println("dnssec.Parse", i, v) + } + p.Jcarr() +} +*/ |
