vendor: only vendor on emitted binaries
Moves the vendor/ directory to cmd/vendor. Vendored binaries are built from cmd/, which is backed by symlinks pointing back to repo root.
This commit is contained in:
25
cmd/vendor/github.com/xiang90/probing/server.go
generated
vendored
Normal file
25
cmd/vendor/github.com/xiang90/probing/server.go
generated
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
package probing
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
func NewHandler() http.Handler {
|
||||
return &httpHealth{}
|
||||
}
|
||||
|
||||
type httpHealth struct {
|
||||
}
|
||||
|
||||
type Health struct {
|
||||
OK bool
|
||||
Now time.Time
|
||||
}
|
||||
|
||||
func (h *httpHealth) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
health := Health{OK: true, Now: time.Now()}
|
||||
e := json.NewEncoder(w)
|
||||
e.Encode(health)
|
||||
}
|
Reference in New Issue
Block a user