htlcswitch/hodl/config_production: hide cli hodl flags in prod

This commit replaces the debug Config struct with an empty
one, so that the command line flags are hidden in production
builds.

Production help before commit:

Tor:
      --tor.active
      --tor.socks=
      --tor.dns=
      --tor.streamisolation
      --tor.control=
      --tor.v2
      --tor.v2privatekeypath=
      --tor.v3

hodl:
      --hodl.exit-settle
      --hodl.add-incoming
      --hodl.settle-incoming
      --hodl.fail-incoming
      --hodl.add-outgoing
      --hodl.settle-outgoing
      --hodl.fail-outgoing
      --hodl.commit
      --hodl.bogus-settle

Help Options:
  -h, --help

Production help after commit:

Tor:
      --tor.active
      --tor.socks=
      --tor.dns=
      --tor.streamisolation
      --tor.control=
      --tor.v2
      --tor.v2privatekeypath=
      --tor.v3

Help Options:
  -h, --help
This commit is contained in:
Conner Fromknecht 2018-07-25 03:31:09 -07:00
parent 0df2bcd18c
commit a5e841c6b7
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7

View File

@ -0,0 +1,11 @@
// +build !debug
package hodl
// Config is an empty struct disabling command line hodl flags in production.
type Config struct{}
// Mask in production always returns MaskNone.
func (c *Config) Mask() Mask {
return MaskNone
}