func (c *discoverInitCmd) Synopsis() string {
	return "Automate discovery management."
}
Synopsis should return a one-line, short synopsis of the command.
This should be short (50 characters of less ideally).
package main
import (
	"crypto/x509"
	"flag"
	"net"
	"path/filepath"
	"strconv"
	"github.com/go-kit/kit/log"
	"github.com/go-kit/kit/log/level"
	"github.com/pborman/uuid"
	"github.com/pkg/errors"
	"github.com/prometheus/client_golang/prometheus"
	"github.com/spoke-d/clui"
	"github.com/spoke-d/clui/flagset"
	"github.com/spoke-d/thermionic/internal/cert"
	clusterconfig "github.com/spoke-d/thermionic/internal/cluster/config"
	"github.com/spoke-d/thermionic/internal/exec"
	"github.com/spoke-d/thermionic/internal/fsys"
	"github.com/spoke-d/thermionic/internal/sys"
	"github.com/spoke-d/thermionic/internal/version"
	"github.com/spoke-d/thermionic/pkg/api"
	"github.com/spoke-d/thermionic/pkg/api/discovery/root"
	"github.com/spoke-d/thermionic/pkg/api/discovery/shutdown"
	"github.com/spoke-d/thermionic/pkg/api/discovery/waitready"
	"github.com/spoke-d/thermionic/pkg/discovery"
)
type discoverInitCmd struct {
	ui      clui.UI
	flagset *flagset.FlagSet
	networkAddress string
	networkPort    int
	debugAddress   string
	debugPort      int
	debug      bool
	serverCert string
	clientCert string
	clientKey  string
	bindAddress      string
	advertiseAddress string
}
func NewDiscoverInitCmd(ui clui.UI) clui.Command {
	c := &discoverInitCmd{
		ui:      ui,
		flagset: flagset.NewFlagSet("discover", flag.ExitOnError),
	}
	c.init()
	return c
}
func (c *discoverInitCmd) init() {
	c.flagset.BoolVar(&c.debug, "debug", false, "debug logging")
	c.flagset.StringVar(&c.networkAddress, "network-address", "127.0.0.1", "address to bind to")
	c.flagset.IntVar(&c.networkPort, "network-port", 8082, "port to bind to")
	c.flagset.StringVar(&c.debugAddress, "debug-address", "", "debug address to bind to")
	c.flagset.IntVar(&c.debugPort, "debug-port", 8083, "debug port to bind to")
	c.flagset.StringVar(&c.serverCert, "server-cert", "", "server certificate")
	c.flagset.StringVar(&c.clientCert, "client-cert", "", "client certificate")
	c.flagset.StringVar(&c.clientKey, "client-key", "", "client key")
	c.flagset.StringVar(&c.bindAddress, "bind-address", "127.0.0.1:8085", "bind address")
	c.flagset.StringVar(&c.advertiseAddress, "advertise-address", "127.0.0.1:8086", "advertise address")
}
func (c *discoverInitCmd) UI() clui.UI {
	return c.ui
}
func (c *discoverInitCmd) FlagSet() *flagset.FlagSet {
	return c.flagset
}
func (c *discoverInitCmd) Help() string {
	return `
Usage: 
  discover init [flags] <leader-daemon-address> <leader-daemon-nonce> <daemon-address> <daemon-nonce>
Description:
  Discover other daemons on the same network, to
  allow automatic management of clustering.
  The discovery agent requires access to both the
  leader and subordinate daemon.
Example:
  cat nonce.txt nonce2.txt | xargs sh -c 'therm discover init 127.0.0.1:9080 $0 127.0.0.1:8080 $1'
`
}