Skip to content

Commit

Permalink
Update pkg/flags/flag.go
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin Wang <[email protected]>
  • Loading branch information
siyuanfoundation and ahrtr authored Jul 31, 2024
1 parent 89ab950 commit 36e8722
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/flags/flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ func IsSet(fs *flag.FlagSet, name string) bool {
return set
}

// GetBoolFlagVal returns the value of the a given bool flag is explicitly set in the cmd line arguments,
// and returns nil if it is not explicitly set.
// GetBoolFlagVal returns the value of the a given bool flag if it is explicitly set
// in the cmd line arguments, otherwise returns nil.
func GetBoolFlagVal(fs *flag.FlagSet, flagName string) (*bool, error) {
if !IsSet(fs, flagName) {
return nil, nil
Expand Down

0 comments on commit 36e8722

Please sign in to comment.