func NewDiscoverInitCmd(ui clui.UI) clui.Command {
	c := &discoverInitCmd{
		ui:      ui,
		flagset: flagset.NewFlagSet("discover", flag.ExitOnError),
	}
	c.init()
	return c
}
NewDiscoverInitCmd creates a Command with sane defaults
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
}