Skip to content

Commit

Permalink
push.go: clarify the docs for PushOptions.Method field
Browse files Browse the repository at this point in the history
This is a follow-up for 9032bb9
Updates #70
  • Loading branch information
valyala committed Jul 16, 2024
1 parent eba0da0 commit d783709
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions push.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -301,7 +302,7 @@ func newPushContext(pushURL string, opts *PushOptions) (*pushContext, error) {
}

method := opts.Method
if len(method) == 0 {
if method == "" {
method = http.MethodGet
}

Expand Down

0 comments on commit d783709

Please sign in to comment.