Fixes #22: Fixes style issues

This commit is contained in:
Thomas Pelletier
2014-08-29 18:24:51 +02:00
parent a2495b4806
commit fb5423fba2
4 changed files with 114 additions and 115 deletions
+3 -1
View File
@@ -6,7 +6,7 @@ import (
"fmt"
)
// position within a TOML document
// Position within a TOML document
type Position struct {
Line int // line within the document
Col int // column within the line
@@ -18,6 +18,8 @@ func (p *Position) String() string {
return fmt.Sprintf("(%d, %d)", p.Line, p.Col)
}
// Invalid returns wheter or not the position is valid (i.e. with negative or
// null values)
func (p *Position) Invalid() bool {
return p.Line <= 0 || p.Col <= 0
}