summaryrefslogtreecommitdiff
path: root/check.go
diff options
context:
space:
mode:
Diffstat (limited to 'check.go')
-rw-r--r--check.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/check.go b/check.go
index b61bb66..f66813e 100644
--- a/check.go
+++ b/check.go
@@ -3,7 +3,7 @@ package main
import (
"bytes"
"encoding/hex"
- "errors"
+ "fmt"
"io/ioutil"
"math/rand"
"net/http"
@@ -14,8 +14,6 @@ func init() {
rand.Seed(time.Now().UnixNano())
}
-var errDiffer = errors.New("key differs")
-
func Key() string {
b := make([]byte, 16)
for i := range b {
@@ -37,7 +35,7 @@ func Check(uri string) error {
}
body = bytes.TrimSpace(body)
if string(body) != key {
- return errDiffer
+ return fmt.Errorf("%v down", uri)
}
return nil
}