(pos token.Pos, msg string, args ...interface{})
| 380 | } |
| 381 | |
| 382 | func warn(pos token.Pos, msg string, args ...interface{}) { |
| 383 | if pos.IsValid() { |
| 384 | msg = "%s: " + msg |
| 385 | arg1 := []interface{}{fset.Position(pos).String()} |
| 386 | args = append(arg1, args...) |
| 387 | } |
| 388 | fmt.Fprintf(os.Stderr, msg+"\n", args...) |
| 389 | } |
| 390 | |
| 391 | // rewriteUses replaces all uses of the identifier x and !x in scope |
| 392 | // with f(x.Pos()) and fnot(x.Pos()). |