From 698403a02fc9a225c3d51615962b5d3d1264bca9 Mon Sep 17 00:00:00 2001 From: Philip O'Toole Date: Thu, 15 Feb 2024 23:52:11 -0500 Subject: [PATCH] Add commit flag to Query Params --- http/query_params.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/http/query_params.go b/http/query_params.go index 5fbd938a..7222fec0 100644 --- a/http/query_params.go +++ b/http/query_params.go @@ -181,6 +181,11 @@ func (qp QueryParams) FreshnessStrict() bool { return qp.HasKey("freshness_strict") } +// Commit returns whether the commit flag is set. +func (qp QueryParams) Commit() bool { + return qp.HasKey("commit") +} + // Timeout returns the requested timeout duration. func (qp QueryParams) Timeout(def time.Duration) time.Duration { t, ok := qp["timeout"]