Skip to content

Commit

Permalink
using json.RawMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexStocks committed Nov 11, 2020
1 parent f65be42 commit ec3d3d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion log_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ func (s *LogStore) GetLogLines(topic string, from int64, to int64, queryExp stri
if err != nil {
return nil, err
}
var logs []string
var logs []json.RawMessage
err = json.Unmarshal(b, &logs)
if err != nil {
return nil, NewBadResponseError(string(b), rsp.Header, rsp.StatusCode)
Expand Down
2 changes: 1 addition & 1 deletion model.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type GetLogsResponse struct {
// note: GetLogLinesResponse.Logs is nil when use GetLogLinesResponse
type GetLogLinesResponse struct {
GetLogsResponse
Lines []string `json:"lines"`
Lines []json.RawMessage
}

func (resp *GetLogsResponse) IsComplete() bool {
Expand Down

0 comments on commit ec3d3d5

Please sign in to comment.