Skip to content

Commit

Permalink
status unmarshal bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jahaja committed Sep 19, 2020
1 parent 52262b1 commit 34f06d5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 23 deletions.
45 changes: 23 additions & 22 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion loadtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"os"
"reflect"
"sort"
"strings"
"sync"
"time"
)
Expand Down Expand Up @@ -60,7 +61,7 @@ var statusTypesFromString = map[string]StatusType{
}

func (s *StatusType) UnmarshalJSON(bytes []byte) error {
*s = statusTypesFromString[string(bytes)]
*s = statusTypesFromString[strings.Trim(string(bytes), "\"")]
return nil
}

Expand Down

0 comments on commit 34f06d5

Please sign in to comment.