Skip to content

Commit

Permalink
refactor(pkg/client): Rename struct ClientConf to ClientConfig.
Browse files Browse the repository at this point in the history
  • Loading branch information
liushao committed Dec 12, 2022
1 parent fb0876d commit bd2440c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/client/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,20 @@ const (
ymlSuffix = "yml"
)

type ClientConf struct {
type ClientConfig struct {
TmConfig tm.TmConfig `yaml:"tm" json:"tm,omitempty" property:"tm" koanf:"tm"`
}

func (c *ClientConf) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet) {
func (c *ClientConfig) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet) {
// TODO: RmConf RegisterFlagsWithPrefix
// TODO: Undo RegisterFlagsWithPrefix
// TODO: LoadBalance RegisterFlagsWithPrefix
c.TmConfig.RegisterFlagsWithPrefix(prefix+".tm", f)
}

type Config struct {
TCCConfig tcc.Config `yaml:"tcc" json:"tcc" koanf:"tcc"`
ClientConfig ClientConf `yaml:"client" json:"client" koanf:"client"`
TCCConfig tcc.Config `yaml:"tcc" json:"tcc" koanf:"tcc"`
ClientConfig ClientConfig `yaml:"client" json:"client" koanf:"client"`
}

func (c *Config) RegisterFlags(f *flag.FlagSet) {
Expand Down

0 comments on commit bd2440c

Please sign in to comment.