Skip to content

Commit

Permalink
Delete useless cond, extend test data
Browse files Browse the repository at this point in the history
Signed-off-by: Daniil Rutskiy <[email protected]>
  • Loading branch information
dstdfx committed Oct 27, 2020
1 parent 5d4287f commit bca44b6
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions codes/codes.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ package codes // import "go.opentelemetry.io/otel/codes"

import (
"encoding/json"
"errors"
"fmt"
"strconv"
)
Expand Down Expand Up @@ -76,9 +75,6 @@ func (c *Code) UnmarshalJSON(b []byte) error {
if err := json.Unmarshal(b, &x); err != nil {
return err
}
if x == nil {
return errors.New("null code value")
}
switch x.(type) {
case string:
if jc, ok := strToCode[string(b)]; ok {
Expand Down

0 comments on commit bca44b6

Please sign in to comment.