From d783709a53d143a52cb1036af5fcd612f756afe7 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 16 Jul 2024 13:14:56 +0200 Subject: [PATCH] push.go: clarify the docs for PushOptions.Method field This is a follow-up for 9032bb9e48db368a333b968209ffb42c48a43d8b Updates https://github.com/VictoriaMetrics/metrics/pull/70 --- push.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/push.go b/push.go index 63a3b1b..f33886f 100644 --- a/push.go +++ b/push.go @@ -32,7 +32,8 @@ type PushOptions struct { // By default the compression is enabled. DisableCompression bool - // Method is an optional of HTTP request method. + // Method is HTTP request method to use when pushing metrics to pushURL. + // // By default the Method is GET. Method string @@ -301,7 +302,7 @@ func newPushContext(pushURL string, opts *PushOptions) (*pushContext, error) { } method := opts.Method - if len(method) == 0 { + if method == "" { method = http.MethodGet }