summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRagnis Armus <ragnis@armus.ee>2018-07-12 23:07:39 +0300
committerRagnis Armus <ragnis@armus.ee>2018-07-12 23:07:39 +0300
commitfe98453415c06f812bb7be7a728cabfe47c2060a (patch)
tree145da7842b1a128801c5c612f74df2dbf940c524
parent9aa8e334e042861490f3d21c03b53e06d6fcedbd (diff)
add comments to cgitrc.ParserField
-rw-r--r--cgitrc/parser.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/cgitrc/parser.go b/cgitrc/parser.go
index 4af57e7..edb8238 100644
--- a/cgitrc/parser.go
+++ b/cgitrc/parser.go
@@ -18,6 +18,7 @@ const (
// Parser parses a cgitrc file.
type Parser struct {
+ // Fields is a slice of all parsed key-value pairs.
Fields []*ParserField
state parserState
@@ -28,10 +29,14 @@ type Parser struct {
lineNo uint
}
-// ParserField describes a single key-value pair.
+// ParserField is a single key-value pair.
type ParserField struct {
- Keys []string
- Value string
+ // Keys is a slice of period-separated field key parts.
+ Keys []string
+ // Value is the field value.
+ Value string
+ // LineNo is the line number, starting from 1, from which the line was
+ // parsed.
LineNo uint
}