Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: remove deprecation warnings when option unset
Resolves #6531
  • Loading branch information
ammario committed Mar 9, 2023
commit 2899573b8dd7d68cd57ba8aa56019c6048161589
4 changes: 4 additions & 0 deletions cli/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,10 @@ flags, and YAML configuration. The precedence is as follows:
continue
}

if opt.Value.String() == opt.Default {
continue
}
Comment on lines +260 to +262
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a field to bigcli types similar to what cobra had for .Changed()?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm still working through the migration. I think it'd be cool to have a value source for each field, so we can show people on the deployment page how everything is being set.


warnStr := opt.Name + " is deprecated, please use "
for i, use := range opt.UseInstead {
warnStr += use.Name + " "
Expand Down