Standard Library

GoTextScanner

Go stdlib package — text/scanner. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

Other Methods

.Position.IsValid()Neutral
#
Signature
Position.IsValid() bool

IsValid reports whether the position is valid.

.Position.String()Neutral
#
Signature
Position.String() string

Position.String function.

.Scanner.Init()Neutral
#
Signature
Scanner.Init(src io.Reader) *Scanner

Init initializes a Scanner with a new source and returns s.

.Scanner.Next()Neutral
#
Signature
Scanner.Next() rune

Next reads and returns the next Unicode character.

.Scanner.Peek()Neutral
#
Signature
Scanner.Peek() rune

Peek returns the next Unicode character in the source without advancing

.Scanner.Pos()Neutral
#
Signature
Scanner.Pos() Position

Pos returns the position of the character immediately after

.Scanner.Scan()Neutral
#
Signature
Scanner.Scan() rune

Scan reads the next token or Unicode character from source and returns it.

.Scanner.TokenText()Neutral
#
Signature
Scanner.TokenText() string

TokenText returns the string corresponding to the most recently scanned token.

.TokenString()Neutral
#
Signature
TokenString(tok rune) string

TokenString returns a printable string for a token or Unicode character.

.Position()Neutral
#
Signature
type Position ...

Position is a value that represents a source position.

Fully-Qualified Names

FQNField
text/scannerfqns[0]

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

go.mod
// standard library — no go.mod entry required
rule.py
from codepathfinder.go_rule import ...  # text/scanner