FAQ
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
}

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedNov 26, '12 at 11:20p
activeNov 27, '12 at 1:18a
posts3
users2
websitegolang.org

2 users in discussion

Gri: 2 posts David Symonds: 1 post

People

Translate

site design / logo © 2022 Grokbase