diff --git a/examples/graceful/main_test.go b/examples/graceful/main_test.go index 0272bac..5e60e47 100644 --- a/examples/graceful/main_test.go +++ b/examples/graceful/main_test.go @@ -70,8 +70,8 @@ func ExampleMain() { l.Info("done") // Output: - // {"level":"info","logger":"root.server","msg":"starting keel service","keel_service_type":"http","keel_service_name":"healthz","net_host_ip":"localhost","net_host_port":"9400"} // {"level":"info","logger":"root.server","msg":"starting keel server"} + // {"level":"info","logger":"root.server","msg":"starting keel service","keel_service_type":"http","keel_service_name":"healthz","net_host_ip":"localhost","net_host_port":"9400"} // {"level":"info","logger":"root","msg":"starting keel service","keel_service_type":"http","keel_service_name":"http","net_host_ip":"localhost","net_host_port":"8080"} // {"level":"info","logger":"root","msg":"1. starting checks"} // {"level":"info","logger":"root","msg":"2. sleeping for 5 seconds"} @@ -92,13 +92,13 @@ func ExampleMain() { // {"level":"debug","logger":"root.server","msg":"keel graceful shutdown: closer closed","name":"*service.HTTP"} // {"level":"info","logger":"root.closer","msg":"closing stuff"} // {"level":"error","logger":"root.http","msg":"failed to send request","url":"http://localhost:8080","error":"Get \"http://localhost:8080\": dial tcp [::1]:8080: connect: connection refused"} - // {"level":"debug","logger":"root.server","msg":"healthz probe failed","error_type":"*errors.fundamental","error_message":"service not running","error_messageVerbose":"service not running\ngithub.com/foomo/keel/service.init\n\t:1\nruntime.doInit1\n\t/opt/homebrew/opt/go/libexec/src/runtime/proc.go:7176\nruntime.doInit\n\t/opt/homebrew/opt/go/libexec/src/runtime/proc.go:7143\nruntime.main\n\t/opt/homebrew/opt/go/libexec/src/runtime/proc.go:253\nruntime.goexit\n\t/opt/homebrew/opt/go/libexec/src/runtime/asm_arm64.s:1222","http_target":"/healthz/readiness"} + // {"level":"debug","logger":"root.server","msg":"healthz probe failed","error_type":"*errors.errorString","error_message":"service not running","http_target":"/healthz/readiness"} // {"level":"info","logger":"root.readiness","msg":"ok","url":"http://localhost:9400/healthz/readiness","status":503} // {"level":"error","logger":"root.http","msg":"failed to send request","url":"http://localhost:8080","error":"Get \"http://localhost:8080\": dial tcp [::1]:8080: connect: connection refused"} - // {"level":"debug","logger":"root.server","msg":"healthz probe failed","error_type":"*errors.fundamental","error_message":"service not running","error_messageVerbose":"service not running\ngithub.com/foomo/keel/service.init\n\t:1\nruntime.doInit1\n\t/opt/homebrew/opt/go/libexec/src/runtime/proc.go:7176\nruntime.doInit\n\t/opt/homebrew/opt/go/libexec/src/runtime/proc.go:7143\nruntime.main\n\t/opt/homebrew/opt/go/libexec/src/runtime/proc.go:253\nruntime.goexit\n\t/opt/homebrew/opt/go/libexec/src/runtime/asm_arm64.s:1222","http_target":"/healthz/readiness"} + // {"level":"debug","logger":"root.server","msg":"healthz probe failed","error_type":"*errors.errorString","error_message":"service not running","http_target":"/healthz/readiness"} // {"level":"info","logger":"root.readiness","msg":"ok","url":"http://localhost:9400/healthz/readiness","status":503} // {"level":"error","logger":"root.http","msg":"failed to send request","url":"http://localhost:8080","error":"Get \"http://localhost:8080\": dial tcp [::1]:8080: connect: connection refused"} - // {"level":"debug","logger":"root.server","msg":"healthz probe failed","error_type":"*errors.fundamental","error_message":"service not running","error_messageVerbose":"service not running\ngithub.com/foomo/keel/service.init\n\t:1\nruntime.doInit1\n\t/opt/homebrew/opt/go/libexec/src/runtime/proc.go:7176\nruntime.doInit\n\t/opt/homebrew/opt/go/libexec/src/runtime/proc.go:7143\nruntime.main\n\t/opt/homebrew/opt/go/libexec/src/runtime/proc.go:253\nruntime.goexit\n\t/opt/homebrew/opt/go/libexec/src/runtime/asm_arm64.s:1222","http_target":"/healthz/readiness"} + // {"level":"debug","logger":"root.server","msg":"healthz probe failed","error_type":"*errors.errorString","error_message":"service not running","http_target":"/healthz/readiness"} // {"level":"info","logger":"root.readiness","msg":"ok","url":"http://localhost:9400/healthz/readiness","status":503} // {"level":"info","logger":"root.closer","msg":"done closing stuff"} // {"level":"debug","logger":"root.server","msg":"keel graceful shutdown: closer closed","name":"interfaces.CloserFunc"} diff --git a/service/errors.go b/service/errors.go index 53f93a8..97c6c1b 100644 --- a/service/errors.go +++ b/service/errors.go @@ -1,7 +1,7 @@ package service import ( - "github.com/pkg/errors" + "errors" ) var (