mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-04 23:45:07 +00:00
25ef3da9d5
chore(fmt): run gci on complete project Fix global import formatting in go code by running the `gci` command. This allows us to just use the command directly, instead of fixing the import order manually for the linter, on each PR. Co-authored-by: Elio Bischof <elio@zitadel.com>
32 lines
692 B
Go
32 lines
692 B
Go
package start
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
"github.com/spf13/pflag"
|
|
"github.com/spf13/viper"
|
|
"github.com/zitadel/logging"
|
|
|
|
"github.com/zitadel/zitadel/cmd/key"
|
|
"github.com/zitadel/zitadel/cmd/tls"
|
|
)
|
|
|
|
var (
|
|
startFlagSet = &pflag.FlagSet{}
|
|
)
|
|
|
|
func init() {
|
|
startFlagSet.Uint16("port", 0, "port to run ZITADEL on")
|
|
startFlagSet.String("externalDomain", "", "domain ZITADEL will be exposed on")
|
|
startFlagSet.String("externalPort", "", "port ZITADEL will be exposed on")
|
|
}
|
|
|
|
func startFlags(cmd *cobra.Command) {
|
|
cmd.Flags().AddFlagSet(startFlagSet)
|
|
logging.OnError(
|
|
viper.BindPFlags(startFlagSet),
|
|
).Fatal("start flags")
|
|
|
|
tls.AddTLSModeFlag(cmd)
|
|
key.AddMasterKeyFlag(cmd)
|
|
}
|