gofmt -w
This commit is contained in:
@@ -1,13 +1,13 @@
|
|||||||
package cachet
|
package cachet
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
|
||||||
"fmt"
|
|
||||||
"flag"
|
|
||||||
"net/url"
|
|
||||||
"net/http"
|
|
||||||
"io/ioutil"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"flag"
|
||||||
|
"fmt"
|
||||||
|
"io/ioutil"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Static config
|
// Static config
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package cachet
|
package cachet
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
"encoding/json"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Incident Cachet data model
|
// Incident Cachet data model
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package cachet
|
package cachet
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
"encoding/json"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// SendMetric sends lag metric point
|
// SendMetric sends lag metric point
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package cachet
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
const timeout = time.Duration(time.Second)
|
const timeout = time.Duration(time.Second)
|
||||||
|
|||||||
4
main.go
4
main.go
@@ -2,8 +2,8 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
|
||||||
"github.com/castawaylabs/cachet-monitor/cachet"
|
"github.com/castawaylabs/cachet-monitor/cachet"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
@@ -19,7 +19,7 @@ func main() {
|
|||||||
fmt.Println()
|
fmt.Println()
|
||||||
|
|
||||||
ticker := time.NewTicker(time.Second)
|
ticker := time.NewTicker(time.Second)
|
||||||
for _ = range ticker.C {
|
for range ticker.C {
|
||||||
for _, monitor := range cachet.Config.Monitors {
|
for _, monitor := range cachet.Config.Monitors {
|
||||||
go monitor.Run()
|
go monitor.Run()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user