Skip to content

Commit

Permalink
fix(#7): deprecated ip
Browse files Browse the repository at this point in the history
deprecated ip

Signed-off-by: ysicing <[email protected]>
  • Loading branch information
ysicing committed Jul 20, 2023
1 parent 78b51c9 commit 58ac393
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
6 changes: 6 additions & 0 deletions cmd/flags/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ func ConvertFlags(cmd *cobra.Command, fs []types.Flag) *pflag.FlagSet {
if f.Required {
_ = cobra.MarkFlagRequired(pf, f.Name)
}
if f.Hidden {
pf.MarkHidden(f.Name)
}
}
} else {
if cmd.Flags().Lookup(f.Name) == nil {
Expand All @@ -92,6 +95,9 @@ func ConvertFlags(cmd *cobra.Command, fs []types.Flag) *pflag.FlagSet {
if f.Required {
_ = cobra.MarkFlagRequired(pf, f.Name)
}
if f.Hidden {
pf.MarkHidden(f.Name)
}
}
}

Expand Down
1 change: 1 addition & 0 deletions internal/pkg/types/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ type Flag struct {
ShortHand string
Usage string
Required bool
Hidden bool
EnvVar string
}

Expand Down
9 changes: 5 additions & 4 deletions pkg/quickon/quickon.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,11 @@ func (m *Meta) GetFlags() []types.Flag {
V: m.Domain,
},
{
Name: "ip",
Usage: "quickon ip",
P: &m.IP,
V: m.IP,
Name: "ip",
Usage: "quickon ip",
P: &m.IP,
V: m.IP,
Hidden: true,
},
{
Name: "version",
Expand Down

0 comments on commit 58ac393

Please sign in to comment.