mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: clean up rule logging helpers
Introduced in CLs 29380 and 30011. Change-Id: I3d3641e8748ce0adb57b087a1fcd62f295ade665 Reviewed-on: https://go-review.googlesource.com/31933 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
parent
a3faa80033
commit
1abefc1ff0
1 changed files with 2 additions and 2 deletions
|
|
@ -481,7 +481,7 @@ func clobber(v *Value) bool {
|
|||
// noteRule("note to self: rule of interest matched")
|
||||
// and that message will print when the rule matches.
|
||||
func noteRule(s string) bool {
|
||||
println(s)
|
||||
fmt.Println(s)
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
@ -489,7 +489,7 @@ func noteRule(s string) bool {
|
|||
// cond is true and the rule is fired.
|
||||
func warnRule(cond bool, v *Value, s string) bool {
|
||||
if cond {
|
||||
v.Block.Func.Config.Warnl(v.Line, "removed nil check")
|
||||
v.Block.Func.Config.Warnl(v.Line, s)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue