Skip to content

Commit 257f202

Browse files
author
Dean Karn
authored
Merge pull request #588 from erikaleigh/fix-grammatical-errors
Fix grammatical errors in errors.go
2 parents dbfcad2 + 3909783 commit 257f202

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

errors.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ type FieldError interface {
9999
ActualTag() string
100100

101101
// returns the namespace for the field error, with the tag
102-
// name taking precedence over the fields actual name.
102+
// name taking precedence over the field's actual name.
103103
//
104104
// eg. JSON name "User.fname"
105105
//
@@ -109,29 +109,29 @@ type FieldError interface {
109109
// using validate.Field(...) as there is no way to extract it's name
110110
Namespace() string
111111

112-
// returns the namespace for the field error, with the fields
112+
// returns the namespace for the field error, with the field's
113113
// actual name.
114114
//
115115
// eq. "User.FirstName" see Namespace for comparison
116116
//
117117
// NOTE: this field can be blank when validating a single primitive field
118-
// using validate.Field(...) as there is no way to extract it's name
118+
// using validate.Field(...) as there is no way to extract its name
119119
StructNamespace() string
120120

121121
// returns the fields name with the tag name taking precedence over the
122-
// fields actual name.
122+
// field's actual name.
123123
//
124124
// eq. JSON name "fname"
125125
// see StructField for comparison
126126
Field() string
127127

128-
// returns the fields actual name from the struct, when able to determine.
128+
// returns the field's actual name from the struct, when able to determine.
129129
//
130130
// eq. "FirstName"
131131
// see Field for comparison
132132
StructField() string
133133

134-
// returns the actual fields value in case needed for creating the error
134+
// returns the actual field's value in case needed for creating the error
135135
// message
136136
Value() interface{}
137137

@@ -190,19 +190,19 @@ func (fe *fieldError) ActualTag() string {
190190
}
191191

192192
// Namespace returns the namespace for the field error, with the tag
193-
// name taking precedence over the fields actual name.
193+
// name taking precedence over the field's actual name.
194194
func (fe *fieldError) Namespace() string {
195195
return fe.ns
196196
}
197197

198-
// StructNamespace returns the namespace for the field error, with the fields
198+
// StructNamespace returns the namespace for the field error, with the field's
199199
// actual name.
200200
func (fe *fieldError) StructNamespace() string {
201201
return fe.structNs
202202
}
203203

204-
// Field returns the fields name with the tag name taking precedence over the
205-
// fields actual name.
204+
// Field returns the field's name with the tag name taking precedence over the
205+
// field's actual name.
206206
func (fe *fieldError) Field() string {
207207

208208
return fe.ns[len(fe.ns)-int(fe.fieldLen):]
@@ -218,13 +218,13 @@ func (fe *fieldError) Field() string {
218218
// return fld
219219
}
220220

221-
// returns the fields actual name from the struct, when able to determine.
221+
// returns the field's actual name from the struct, when able to determine.
222222
func (fe *fieldError) StructField() string {
223223
// return fe.structField
224224
return fe.structNs[len(fe.structNs)-int(fe.structfieldLen):]
225225
}
226226

227-
// Value returns the actual fields value in case needed for creating the error
227+
// Value returns the actual field's value in case needed for creating the error
228228
// message
229229
func (fe *fieldError) Value() interface{} {
230230
return fe.value

0 commit comments

Comments
 (0)