Fix printf formatting

This commit is contained in:
Thomas Pelletier
2016-01-31 17:02:23 +01:00
parent 14c964fc02
commit 8176e30b38
5 changed files with 11 additions and 14 deletions
+6 -8
View File
@@ -6,13 +6,11 @@ import (
"fmt"
)
/*
Position of a document element within a TOML document.
Line and Col are both 1-indexed positions for the element's line number and
column number, respectively. Values of zero or less will cause Invalid(),
to return true.
*/
// Position of a document element within a TOML document.
//
// Line and Col are both 1-indexed positions for the element's line number and
// column number, respectively. Values of zero or less will cause Invalid(),
// to return true.
type Position struct {
Line int // line within the document
Col int // column within the line
@@ -24,7 +22,7 @@ func (p *Position) String() string {
return fmt.Sprintf("(%d, %d)", p.Line, p.Col)
}
// Returns whether or not the position is valid (i.e. with negative or
// Invalid returns whether 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