aboutsummaryrefslogtreecommitdiff
path: root/src/encoding
diff options
context:
space:
mode:
Diffstat (limited to 'src/encoding')
-rw-r--r--src/encoding/gob/decoder.go2
-rw-r--r--src/encoding/json/decode.go6
-rw-r--r--src/encoding/xml/read.go2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/encoding/gob/decoder.go b/src/encoding/gob/decoder.go
index 8e0b1dd375..9398b8f243 100644
--- a/src/encoding/gob/decoder.go
+++ b/src/encoding/gob/decoder.go
@@ -55,7 +55,7 @@ func NewDecoder(r io.Reader) *Decoder {
// recvType loads the definition of a type.
func (dec *Decoder) recvType(id typeId) {
- // Have we already seen this type? That's an error
+ // Have we already seen this type? That's an error
if id < firstUserId || dec.wireType[id] != nil {
dec.err = errors.New("gob: duplicate type received")
return
diff --git a/src/encoding/json/decode.go b/src/encoding/json/decode.go
index 420a07e154..bc3bd9733d 100644
--- a/src/encoding/json/decode.go
+++ b/src/encoding/json/decode.go
@@ -508,7 +508,7 @@ func (d *decodeState) array(v reflect.Value) {
switch v.Kind() {
case reflect.Interface:
if v.NumMethod() == 0 {
- // Decoding into nil interface? Switch to non-reflect code.
+ // Decoding into nil interface? Switch to non-reflect code.
v.Set(reflect.ValueOf(d.arrayInterface()))
return
}
@@ -612,7 +612,7 @@ func (d *decodeState) object(v reflect.Value) {
}
v = pv
- // Decoding into nil interface? Switch to non-reflect code.
+ // Decoding into nil interface? Switch to non-reflect code.
if v.Kind() == reflect.Interface && v.NumMethod() == 0 {
v.Set(reflect.ValueOf(d.objectInterface()))
return
@@ -1190,7 +1190,7 @@ func unquoteBytes(s []byte) (t []byte, ok bool) {
b := make([]byte, len(s)+2*utf8.UTFMax)
w := copy(b, s[0:r])
for r < len(s) {
- // Out of room? Can only happen if s is full of
+ // Out of room? Can only happen if s is full of
// malformed UTF-8 and we're replacing each
// byte with RuneError.
if w >= len(b)-2*utf8.UTFMax {
diff --git a/src/encoding/xml/read.go b/src/encoding/xml/read.go
index dffb95d77a..2fd6e06688 100644
--- a/src/encoding/xml/read.go
+++ b/src/encoding/xml/read.go
@@ -160,7 +160,7 @@ func (e UnmarshalError) Error() string { return string(e) }
// UnmarshalXML must consume exactly one XML element.
// One common implementation strategy is to unmarshal into
// a separate value with a layout matching the expected XML
-// using d.DecodeElement, and then to copy the data from
+// using d.DecodeElement, and then to copy the data from
// that value into the receiver.
// Another common strategy is to use d.Token to process the
// XML object one token at a time.