diff --git a/iter_object.go b/iter_object.go index 58ee89c..0abd881 100644 --- a/iter_object.go +++ b/iter_object.go @@ -40,7 +40,7 @@ func (iter *Iterator) ReadObject() (ret string) { case '}': return "" // end of object default: - iter.ReportError("ReadObject", fmt.Sprintf(`expect { or , or } or n, but found %s`, string([]byte{c}))) + iter.ReportError("ReadObject", fmt.Sprintf(`expect { or , or } or n, but found %c`, c)) return } } diff --git a/iter_skip.go b/iter_skip.go index e91eefb..cf64c97 100644 --- a/iter_skip.go +++ b/iter_skip.go @@ -97,34 +97,34 @@ func (iter *Iterator) Skip() { func (iter *Iterator) skipFourBytes(b1, b2, b3, b4 byte) { if iter.readByte() != b1 { - iter.ReportError("skipFourBytes", fmt.Sprintf("expect %s", string([]byte{b1, b2, b3, b4}))) + iter.ReportError("skipFourBytes", fmt.Sprintf("expect %s", []byte{b1, b2, b3, b4})) return } if iter.readByte() != b2 { - iter.ReportError("skipFourBytes", fmt.Sprintf("expect %s", string([]byte{b1, b2, b3, b4}))) + iter.ReportError("skipFourBytes", fmt.Sprintf("expect %s", []byte{b1, b2, b3, b4})) return } if iter.readByte() != b3 { - iter.ReportError("skipFourBytes", fmt.Sprintf("expect %s", string([]byte{b1, b2, b3, b4}))) + iter.ReportError("skipFourBytes", fmt.Sprintf("expect %s", []byte{b1, b2, b3, b4})) return } if iter.readByte() != b4 { - iter.ReportError("skipFourBytes", fmt.Sprintf("expect %s", string([]byte{b1, b2, b3, b4}))) + iter.ReportError("skipFourBytes", fmt.Sprintf("expect %s", []byte{b1, b2, b3, b4})) return } } func (iter *Iterator) skipThreeBytes(b1, b2, b3 byte) { if iter.readByte() != b1 { - iter.ReportError("skipThreeBytes", fmt.Sprintf("expect %s", string([]byte{b1, b2, b3}))) + iter.ReportError("skipThreeBytes", fmt.Sprintf("expect %s", []byte{b1, b2, b3})) return } if iter.readByte() != b2 { - iter.ReportError("skipThreeBytes", fmt.Sprintf("expect %s", string([]byte{b1, b2, b3}))) + iter.ReportError("skipThreeBytes", fmt.Sprintf("expect %s", []byte{b1, b2, b3})) return } if iter.readByte() != b3 { - iter.ReportError("skipThreeBytes", fmt.Sprintf("expect %s", string([]byte{b1, b2, b3}))) + iter.ReportError("skipThreeBytes", fmt.Sprintf("expect %s", []byte{b1, b2, b3})) return } }