Pointer cleanup (#78)
Remove unnecessary pointer receivers for Position and QueryResult
This commit is contained in:
committed by
Thomas Pelletier
parent
64ff1ea4d5
commit
65ad89c1a7
+2
-2
@@ -18,12 +18,12 @@ type Position struct {
|
||||
|
||||
// String representation of the position.
|
||||
// Displays 1-indexed line and column numbers.
|
||||
func (p *Position) String() string {
|
||||
func (p Position) String() string {
|
||||
return fmt.Sprintf("(%d, %d)", p.Line, p.Col)
|
||||
}
|
||||
|
||||
// Invalid returns whether or not the position is valid (i.e. with negative or
|
||||
// null values)
|
||||
func (p *Position) Invalid() bool {
|
||||
func (p Position) Invalid() bool {
|
||||
return p.Line <= 0 || p.Col <= 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user