Gitleaks v1.0.0 (#75)

major bump
This commit is contained in:
Zachary Rice authored and GitHub committed 2018-07-20 20:02:52 -05:00
1 parent 91eb014f17
commit 1f80d14f3f
685 files changed
+143450 -17228

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
package ssh_config
import "fmt"
// Position of a document element within a SSH 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 uint32 // line within the document
Col uint16 // column within the line
}
// String representation of the position.
// Displays 1-indexed line and column numbers.
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 {
return p.Line <= 0 || p.Col <= 0
}