Change config file indentation to 2 spaces

This commit is contained in:
Cameron Sparr
2015-10-15 15:53:29 -06:00
parent 555436a222
commit 4e5ed9d3b9
34 changed files with 387 additions and 381 deletions

View File

@@ -19,8 +19,8 @@ type Nginx struct {
}
var sampleConfig = `
# An array of Nginx stub_status URI to gather stats.
urls = ["http://localhost/status"]
# An array of Nginx stub_status URI to gather stats.
urls = ["http://localhost/status"]
`
func (n *Nginx) SampleConfig() string {
@@ -141,22 +141,21 @@ func (n *Nginx) gatherUrl(addr *url.URL, acc plugins.Accumulator) error {
// Get tag(s) for the nginx plugin
func getTags(addr *url.URL) map[string]string {
h := addr.Host
host, port, err := net.SplitHostPort(h)
if err != nil {
host = addr.Host
if addr.Scheme == "http" {
port = "80"
} else if addr.Scheme == "https" {
port = "443"
} else {
port = ""
}
}
return map[string]string{"server": host, "port": port}
h := addr.Host
host, port, err := net.SplitHostPort(h)
if err != nil {
host = addr.Host
if addr.Scheme == "http" {
port = "80"
} else if addr.Scheme == "https" {
port = "443"
} else {
port = ""
}
}
return map[string]string{"server": host, "port": port}
}
func init() {
plugins.Add("nginx", func() plugins.Plugin {
return &Nginx{}