Skip to content

Commit

Permalink
fix(pp): fix comments and use less angry emojis for non-fatal errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
favonia committed Jul 26, 2021
1 parent 89c414a commit 020d326
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ func (c *Config) checkUselessDomains(indent pp.Indent) {
if !c.Policy[ipNet].IsManaged() {
for domain := range domainSet[ipNet] {
if !intersectSet[domain] {
pp.Printf(indent, pp.EmojiUserError,
pp.Printf(indent, pp.EmojiUserWarning,
"Domain %v is ignored because it is only for %v but %v is unmanaged.", domain, ipNet, ipNet)
}
}
Expand All @@ -266,7 +266,7 @@ func (c *Config) Normalize(indent pp.Indent) bool {
for ipNet, domains := range c.Domains {
if len(domains) == 0 && c.Policy[ipNet].IsManaged() {
c.Policy[ipNet] = &detector.Unmanaged{}
pp.Printf(indent, pp.EmojiUserError, "IP%v_POLICY was changed to %q because no domains were set for %v.",
pp.Printf(indent, pp.EmojiUserWarning, "IP%v_POLICY was changed to %q because no domains were set for %v.",
ipNet.Int(), c.Policy[ipNet], ipNet)
}
}
Expand Down
2 changes: 1 addition & 1 deletion internal/pp/pp.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const (
EmojiUserWarning Emoji = "😦" // warnings about possible configuration mistakes
EmojiError Emoji = "😞" // errors that are not (directly) caused by user errors
EmojiImpossible Emoji = "🤯" // the impossible happened
EmojiGood Emoji = "👍" // the impossible happened
EmojiGood Emoji = "👍" // everything looks good
)

func (e Emoji) String() string {
Expand Down

0 comments on commit 020d326

Please sign in to comment.