MCPcopy Index your code
hub / github.com/publicsuffix/list / LocationString

Method LocationString

tools/internal/parser/text.go:32–41  ·  view source on GitHub ↗

LocationString prints a human-readable description of the SourceRange.

()

Source from the content-addressed store, hash-verified

30// LocationString prints a human-readable description of the
31// SourceRange.
32func (s SourceRange) LocationString() string {
33 switch {
34 case s.LastLine <= s.FirstLine:
35 return "<invalid SourceRange>"
36 case s.LastLine == s.FirstLine+1:
37 return fmt.Sprintf("line %d", s.FirstLine+1)
38 default:
39 return fmt.Sprintf("lines %d-%d", s.FirstLine+1, s.LastLine)
40 }
41}
42
43// merge returns a SourceRange that contains both s and other. If s
44// and other are not contiguous or overlapping, the returned

Callers 15

runCheckPRFunction · 0.80
ErrorMethod · 0.80
ErrorMethod · 0.80
ErrorMethod · 0.80
ErrorMethod · 0.80
ErrorMethod · 0.80
ErrorMethod · 0.80
ErrorMethod · 0.80
ErrorMethod · 0.80
ErrorMethod · 0.80
ErrorMethod · 0.80
ErrorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected