Skip to content

Commit

Permalink
refactor(http_listener_v2): set empty string as default path
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Rosiek <[email protected]>
  • Loading branch information
Dominik Rosiek committed Jul 23, 2021
1 parent 2a3ef57 commit fd96afb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/inputs/http_listener_v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This is a sample configuration for the plugin.

## Path to listen to.
## This option is deprecated and only available for backward-compatibility. Please use paths instead.
# path = "/telegraf"
# path = ""

## Paths to listen to.
# paths = ["/telegraf"]
Expand Down
4 changes: 2 additions & 2 deletions plugins/inputs/http_listener_v2/http_listener_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const sampleConfig = `
## Path to listen to.
## This option is deprecated and only available for backward-compatibility. Please use paths instead.
# path = "/telegraf"
# path = ""
## Paths to listen to.
# paths = ["/telegraf"]
Expand Down Expand Up @@ -390,7 +390,7 @@ func init() {
return &HTTPListenerV2{
ServiceAddress: ":8080",
TimeFunc: time.Now,
Path: "/telegraf",
Path: "",
Paths: []string{"/telegraf"},
Methods: []string{"POST", "PUT"},
DataSource: body,
Expand Down

0 comments on commit fd96afb

Please sign in to comment.