Fix vetting errors

This commit is contained in:
Fabian Reinartz 2016-02-15 11:18:23 +01:00
parent 3620d996cf
commit 6e82fdd419
4 changed files with 39 additions and 38 deletions

2
api.go
View File

@ -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{

View File

@ -607,14 +607,15 @@ type opsGenieMessage struct {
}
type opsGenieCreateMessage struct {
*opsGenieMessage `json:,inline`
Message string `json:"message"`
Details map[string]string `json:"details"`
Source string `json:"source"`
*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.

View File

@ -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, "/")...)...)
}

View File

@ -518,25 +518,25 @@ func AssetNames() []string {
// _bindata is a table, holding each asset generator, mapped to its name.
var _bindata = map[string]func() (*asset, error){
"ui/app/css/main.css": uiAppCssMainCss,
"ui/app/index.html": uiAppIndexHtml,
"ui/app/js/app.js": uiAppJsAppJs,
"ui/app/partials/alert.html": uiAppPartialsAlertHtml,
"ui/app/partials/alerts.html": uiAppPartialsAlertsHtml,
"ui/app/partials/route.html": uiAppPartialsRouteHtml,
"ui/app/css/main.css": uiAppCssMainCss,
"ui/app/index.html": uiAppIndexHtml,
"ui/app/js/app.js": uiAppJsAppJs,
"ui/app/partials/alert.html": uiAppPartialsAlertHtml,
"ui/app/partials/alerts.html": uiAppPartialsAlertsHtml,
"ui/app/partials/route.html": uiAppPartialsRouteHtml,
"ui/app/partials/silence-form.html": uiAppPartialsSilenceFormHtml,
"ui/app/partials/silence.html": uiAppPartialsSilenceHtml,
"ui/app/partials/silences.html": uiAppPartialsSilencesHtml,
"ui/app/partials/status.html": uiAppPartialsStatusHtml,
"ui/bindata.go": uiBindataGo,
"ui/lib/angular-moment.min.js": uiLibAngularMomentMinJs,
"ui/lib/angular-resource.min.js": uiLibAngularResourceMinJs,
"ui/lib/angular-route.min.js": uiLibAngularRouteMinJs,
"ui/lib/angular-sanitize.min.js": uiLibAngularSanitizeMinJs,
"ui/lib/angular.min.js": uiLibAngularMinJs,
"ui/lib/jquery.min.js": uiLibJqueryMinJs,
"ui/lib/kube.min.css": uiLibKubeMinCss,
"ui/lib/moment.min.js": uiLibMomentMinJs,
"ui/app/partials/silence.html": uiAppPartialsSilenceHtml,
"ui/app/partials/silences.html": uiAppPartialsSilencesHtml,
"ui/app/partials/status.html": uiAppPartialsStatusHtml,
"ui/bindata.go": uiBindataGo,
"ui/lib/angular-moment.min.js": uiLibAngularMomentMinJs,
"ui/lib/angular-resource.min.js": uiLibAngularResourceMinJs,
"ui/lib/angular-route.min.js": uiLibAngularRouteMinJs,
"ui/lib/angular-sanitize.min.js": uiLibAngularSanitizeMinJs,
"ui/lib/angular.min.js": uiLibAngularMinJs,
"ui/lib/jquery.min.js": uiLibJqueryMinJs,
"ui/lib/kube.min.css": uiLibKubeMinCss,
"ui/lib/moment.min.js": uiLibMomentMinJs,
}
// AssetDir returns the file names below a certain
@ -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{
@ -589,25 +590,25 @@ var _bintree = &bintree{nil, map[string]*bintree{
"app.js": &bintree{uiAppJsAppJs, map[string]*bintree{}},
}},
"partials": &bintree{nil, map[string]*bintree{
"alert.html": &bintree{uiAppPartialsAlertHtml, map[string]*bintree{}},
"alerts.html": &bintree{uiAppPartialsAlertsHtml, map[string]*bintree{}},
"route.html": &bintree{uiAppPartialsRouteHtml, map[string]*bintree{}},
"alert.html": &bintree{uiAppPartialsAlertHtml, map[string]*bintree{}},
"alerts.html": &bintree{uiAppPartialsAlertsHtml, map[string]*bintree{}},
"route.html": &bintree{uiAppPartialsRouteHtml, map[string]*bintree{}},
"silence-form.html": &bintree{uiAppPartialsSilenceFormHtml, map[string]*bintree{}},
"silence.html": &bintree{uiAppPartialsSilenceHtml, map[string]*bintree{}},
"silences.html": &bintree{uiAppPartialsSilencesHtml, map[string]*bintree{}},
"status.html": &bintree{uiAppPartialsStatusHtml, map[string]*bintree{}},
"silence.html": &bintree{uiAppPartialsSilenceHtml, map[string]*bintree{}},
"silences.html": &bintree{uiAppPartialsSilencesHtml, map[string]*bintree{}},
"status.html": &bintree{uiAppPartialsStatusHtml, map[string]*bintree{}},
}},
}},
"bindata.go": &bintree{uiBindataGo, map[string]*bintree{}},
"lib": &bintree{nil, map[string]*bintree{
"angular-moment.min.js": &bintree{uiLibAngularMomentMinJs, map[string]*bintree{}},
"angular-moment.min.js": &bintree{uiLibAngularMomentMinJs, map[string]*bintree{}},
"angular-resource.min.js": &bintree{uiLibAngularResourceMinJs, map[string]*bintree{}},
"angular-route.min.js": &bintree{uiLibAngularRouteMinJs, map[string]*bintree{}},
"angular-route.min.js": &bintree{uiLibAngularRouteMinJs, map[string]*bintree{}},
"angular-sanitize.min.js": &bintree{uiLibAngularSanitizeMinJs, map[string]*bintree{}},
"angular.min.js": &bintree{uiLibAngularMinJs, map[string]*bintree{}},
"jquery.min.js": &bintree{uiLibJqueryMinJs, map[string]*bintree{}},
"kube.min.css": &bintree{uiLibKubeMinCss, map[string]*bintree{}},
"moment.min.js": &bintree{uiLibMomentMinJs, map[string]*bintree{}},
"angular.min.js": &bintree{uiLibAngularMinJs, map[string]*bintree{}},
"jquery.min.js": &bintree{uiLibJqueryMinJs, map[string]*bintree{}},
"kube.min.css": &bintree{uiLibKubeMinCss, map[string]*bintree{}},
"moment.min.js": &bintree{uiLibMomentMinJs, 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, "/")...)...)
}