Reviewers: dsymonds,
Message:
Hello dsymonds (cc: golang-dev@googlegroups.com),
I'd like you to review this change to
https://code.google.com/p/go
Description:
go/ast: minor cleanup
It's better to use IsValid() then checking a (possibly
partially set up) position agains NoPos directly.
Please review this at http://codereview.appspot.com/6855099/
Affected files:
M src/pkg/go/ast/import.go
Index: src/pkg/go/ast/import.go
===================================================================
--- a/src/pkg/go/ast/import.go
+++ b/src/pkg/go/ast/import.go
@@ -20,7 +20,7 @@
break
}
- if d.Lparen == token.NoPos {
+ if !d.Lparen.IsValid() {
// Not a block: sorted by default.
continue
}