Skip to content

Commit

Permalink
rename bool arg to cond
Browse files Browse the repository at this point in the history
  • Loading branch information
vbauerster committed Dec 15, 2021
1 parent bcd2164 commit 8f9e2bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions bar_option.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ func BarNoPop() BarOption {
}
}

// BarOptional will invoke provided option only when pick is true.
func BarOptional(option BarOption, pick bool) BarOption {
if pick {
// BarOptional will invoke provided option only when cond is true.
func BarOptional(option BarOption, cond bool) BarOption {
if cond {
return option
}
return nil
Expand Down
6 changes: 3 additions & 3 deletions container_option.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ func PopCompletedMode() ContainerOption {
}
}

// ContainerOptional will invoke provided option only when pick is true.
func ContainerOptional(option ContainerOption, pick bool) ContainerOption {
if pick {
// ContainerOptional will invoke provided option only when cond is true.
func ContainerOptional(option ContainerOption, cond bool) ContainerOption {
if cond {
return option
}
return nil
Expand Down

0 comments on commit 8f9e2bc

Please sign in to comment.