Skip to content

Commit 5200979

Browse files
committed
Simplify namings
1 parent bc4a144 commit 5200979

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

type.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ type Pair struct {
7575
// Encode serializes the key-value pair.
7676
func (p *Pair) Encode() string {
7777
if it, isItem := p.Value.(*Item); isItem {
78-
if v, isBool := it.BareItem.(Bool); isBool && bool(v) {
79-
return p.Key + it.Parameters.Encode()
78+
if v, isBool := it.Bare.(Bool); isBool && bool(v) {
79+
return p.Key + it.Params.Encode()
8080
}
8181
}
8282
return p.Key + "=" + p.Value.Encode()
@@ -92,31 +92,31 @@ type Member interface {
9292
// InnerList is an array of zero or more items having zero or more associated
9393
// parameters.
9494
type InnerList struct {
95-
Items []Item
96-
Parameters ParamList
95+
Items []Item
96+
Params ParamList
9797
}
9898

9999
// Encode serializes the inner list.
100100
func (i *InnerList) Encode() string {
101101
if len(i.Items) == 0 {
102-
return "()" + i.Parameters.Encode()
102+
return "()" + i.Params.Encode()
103103
}
104104
items := make([]string, 0, len(i.Items))
105105
for _, it := range i.Items {
106106
items = append(items, it.Encode())
107107
}
108-
return "(" + strings.Join(items, " ") + ")" + i.Parameters.Encode()
108+
return "(" + strings.Join(items, " ") + ")" + i.Params.Encode()
109109
}
110110

111111
// Item is a bare item having zero or more associated parameters.
112112
type Item struct {
113-
BareItem BareItem
114-
Parameters ParamList
113+
Bare BareItem
114+
Params ParamList
115115
}
116116

117117
// Encode serializes the item.
118118
func (i *Item) Encode() string {
119-
return i.BareItem.Encode() + i.Parameters.Encode()
119+
return i.Bare.Encode() + i.Params.Encode()
120120
}
121121

122122
// ParamList is an array of zero or more parameters.

0 commit comments

Comments
 (0)