Merge current v2.11 into v3.0
This commit is contained in:
commit
bc84fdd006
143 changed files with 8736 additions and 6601 deletions
|
@ -2,6 +2,7 @@ package http
|
|||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"hash/fnv"
|
||||
"io"
|
||||
|
@ -44,11 +45,11 @@ func (p *Provider) SetDefaults() {
|
|||
// Init the provider.
|
||||
func (p *Provider) Init() error {
|
||||
if p.Endpoint == "" {
|
||||
return fmt.Errorf("non-empty endpoint is required")
|
||||
return errors.New("non-empty endpoint is required")
|
||||
}
|
||||
|
||||
if p.PollInterval <= 0 {
|
||||
return fmt.Errorf("poll interval must be greater than 0")
|
||||
return errors.New("poll interval must be greater than 0")
|
||||
}
|
||||
|
||||
p.httpClient = &http.Client{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue