Fix typo in error message

This commit is contained in:
Will Glynn 2019-05-28 21:08:57 -05:00
parent c310fd5bb2
commit aa1e1eed2b
1 changed files with 12 additions and 12 deletions

View File

@ -28,7 +28,7 @@ func (e *AttributeEncoder) Encode(attribute string, value interface{}) error {
switch value.(type) {
case int:
if tag != TagInteger && tag != TagEnum {
return fmt.Errorf("tag for attribte %s does not match with value type", attribute)
return fmt.Errorf("tag for attribute %s does not match with value type", attribute)
}
if err := e.encodeTag(tag); err != nil {
@ -44,7 +44,7 @@ func (e *AttributeEncoder) Encode(attribute string, value interface{}) error {
}
case int16:
if tag != TagInteger && tag != TagEnum {
return fmt.Errorf("tag for attribte %s does not match with value type", attribute)
return fmt.Errorf("tag for attribute %s does not match with value type", attribute)
}
if err := e.encodeTag(tag); err != nil {
@ -60,7 +60,7 @@ func (e *AttributeEncoder) Encode(attribute string, value interface{}) error {
}
case int8:
if tag != TagInteger && tag != TagEnum {
return fmt.Errorf("tag for attribte %s does not match with value type", attribute)
return fmt.Errorf("tag for attribute %s does not match with value type", attribute)
}
if err := e.encodeTag(tag); err != nil {
@ -76,7 +76,7 @@ func (e *AttributeEncoder) Encode(attribute string, value interface{}) error {
}
case int32:
if tag != TagInteger && tag != TagEnum {
return fmt.Errorf("tag for attribte %s does not match with value type", attribute)
return fmt.Errorf("tag for attribute %s does not match with value type", attribute)
}
if err := e.encodeTag(tag); err != nil {
@ -92,7 +92,7 @@ func (e *AttributeEncoder) Encode(attribute string, value interface{}) error {
}
case int64:
if tag != TagInteger && tag != TagEnum {
return fmt.Errorf("tag for attribte %s does not match with value type", attribute)
return fmt.Errorf("tag for attribute %s does not match with value type", attribute)
}
if err := e.encodeTag(tag); err != nil {
@ -108,7 +108,7 @@ func (e *AttributeEncoder) Encode(attribute string, value interface{}) error {
}
case []int:
if tag != TagInteger && tag != TagEnum {
return fmt.Errorf("tag for attribte %s does not match with value type", attribute)
return fmt.Errorf("tag for attribute %s does not match with value type", attribute)
}
for index, val := range value.([]int) {
@ -132,7 +132,7 @@ func (e *AttributeEncoder) Encode(attribute string, value interface{}) error {
}
case []int16:
if tag != TagInteger && tag != TagEnum {
return fmt.Errorf("tag for attribte %s does not match with value type", attribute)
return fmt.Errorf("tag for attribute %s does not match with value type", attribute)
}
for index, val := range value.([]int16) {
@ -156,7 +156,7 @@ func (e *AttributeEncoder) Encode(attribute string, value interface{}) error {
}
case []int8:
if tag != TagInteger && tag != TagEnum {
return fmt.Errorf("tag for attribte %s does not match with value type", attribute)
return fmt.Errorf("tag for attribute %s does not match with value type", attribute)
}
for index, val := range value.([]int8) {
@ -180,7 +180,7 @@ func (e *AttributeEncoder) Encode(attribute string, value interface{}) error {
}
case []int32:
if tag != TagInteger && tag != TagEnum {
return fmt.Errorf("tag for attribte %s does not match with value type", attribute)
return fmt.Errorf("tag for attribute %s does not match with value type", attribute)
}
for index, val := range value.([]int32) {
@ -204,7 +204,7 @@ func (e *AttributeEncoder) Encode(attribute string, value interface{}) error {
}
case []int64:
if tag != TagInteger && tag != TagEnum {
return fmt.Errorf("tag for attribte %s does not match with value type", attribute)
return fmt.Errorf("tag for attribute %s does not match with value type", attribute)
}
for index, val := range value.([]int64) {
@ -228,7 +228,7 @@ func (e *AttributeEncoder) Encode(attribute string, value interface{}) error {
}
case bool:
if tag != TagBoolean {
return fmt.Errorf("tag for attribte %s does not match with value type", attribute)
return fmt.Errorf("tag for attribute %s does not match with value type", attribute)
}
if err := e.encodeTag(tag); err != nil {
@ -244,7 +244,7 @@ func (e *AttributeEncoder) Encode(attribute string, value interface{}) error {
}
case []bool:
if tag != TagBoolean {
return fmt.Errorf("tag for attribte %s does not match with value type", attribute)
return fmt.Errorf("tag for attribute %s does not match with value type", attribute)
}
for index, val := range value.([]bool) {