Skip to content

Commit

Permalink
Invert conditional statement for clarity
Browse files Browse the repository at this point in the history
Test to see if the deprecated option is used, then assign it to the new
"blocklist_keys" if found and log that option is deprecated. Review
suggestion from Kyrylo.
  • Loading branch information
thompiler committed Jul 16, 2020
1 parent fde1fda commit 7990e7e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion notifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ func (opt *NotifierOptions) init() {
opt.Revision = os.Getenv("SOURCE_VERSION")
}

if opt.KeysBlocklist == nil {
if len(opt.KeysBlacklist) > 0 {
opt.KeysBlocklist = opt.KeysBlacklist
logger.Printf("KeysBlacklist is a deprecated option. Use KeysBlocklist instead.")
}

if opt.KeysBlocklist == nil {
Expand Down

0 comments on commit 7990e7e

Please sign in to comment.