Skip to content

Commit

Permalink
add IsAccurate flag for GetLogrequest (#237)
Browse files Browse the repository at this point in the history
  • Loading branch information
neverafraid1 authored Oct 20, 2023
1 parent 0fda78a commit 7cb5da3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions model.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ type GetLogRequest struct {
FromNsPart int32 `json:"fromNs"`
ToNsPart int32 `json:"toNs"`
NeedHighlight bool `json:"highlight"`
IsAccurate bool `json:"accurate"`
}

func (glr *GetLogRequest) ToURLParams() url.Values {
Expand All @@ -36,6 +37,8 @@ func (glr *GetLogRequest) ToURLParams() url.Values {
urlVal.Add("query", glr.Query)
urlVal.Add("fromNs", strconv.Itoa(int(glr.FromNsPart)))
urlVal.Add("toNs", strconv.Itoa(int(glr.ToNsPart)))
urlVal.Add("highlight", strconv.FormatBool(glr.NeedHighlight))
urlVal.Add("accurate", strconv.FormatBool(glr.IsAccurate))
return urlVal
}

Expand Down

0 comments on commit 7cb5da3

Please sign in to comment.