mirror of
https://github.com/prometheus/alertmanager
synced 2024-12-27 00:22:17 +00:00
Fix vetting errors
This commit is contained in:
parent
3620d996cf
commit
6e82fdd419
2
api.go
2
api.go
@ -403,7 +403,7 @@ func respondError(w http.ResponseWriter, apiErr apiError, data interface{}) {
|
||||
case errorInternal:
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
default:
|
||||
panic(fmt.Sprintf("unknown error type", apiErr))
|
||||
panic(fmt.Sprintf("unknown error type %q", apiErr))
|
||||
}
|
||||
|
||||
b, err := json.Marshal(&response{
|
||||
|
@ -607,14 +607,15 @@ type opsGenieMessage struct {
|
||||
}
|
||||
|
||||
type opsGenieCreateMessage struct {
|
||||
*opsGenieMessage `json:,inline`
|
||||
*opsGenieMessage `json:",inline"`
|
||||
|
||||
Message string `json:"message"`
|
||||
Details map[string]string `json:"details"`
|
||||
Source string `json:"source"`
|
||||
}
|
||||
|
||||
type opsGenieCloseMessage struct {
|
||||
*opsGenieMessage `json:,inline`
|
||||
*opsGenieMessage `json:",inline"`
|
||||
}
|
||||
|
||||
// Notify implements the Notifier interface.
|
||||
|
@ -182,6 +182,7 @@ type bintree struct {
|
||||
Func func() (*asset, error)
|
||||
Children map[string]*bintree
|
||||
}
|
||||
|
||||
var _bintree = &bintree{nil, map[string]*bintree{
|
||||
"template": &bintree{nil, map[string]*bintree{
|
||||
"default.tmpl": &bintree{templateDefaultTmpl, map[string]*bintree{}},
|
||||
@ -234,4 +235,3 @@ func _filePath(dir, name string) string {
|
||||
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
||||
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
|
||||
}
|
||||
|
||||
|
@ -578,6 +578,7 @@ type bintree struct {
|
||||
Func func() (*asset, error)
|
||||
Children map[string]*bintree
|
||||
}
|
||||
|
||||
var _bintree = &bintree{nil, map[string]*bintree{
|
||||
"ui": &bintree{nil, map[string]*bintree{
|
||||
"app": &bintree{nil, map[string]*bintree{
|
||||
@ -658,4 +659,3 @@ func _filePath(dir, name string) string {
|
||||
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
||||
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user