Fix some typos found by codespell

See,
$ codespell -S "./.git*,./vendor*,./public*"
This commit is contained in:
Mario Trangoni
2018-09-21 11:54:52 +02:00
parent 3689bb778c
commit 80fa66fcb0
16 changed files with 33 additions and 33 deletions
+3 -2
View File
@@ -82,12 +82,13 @@ func (e *DashAlertExtractor) getAlertFromPanels(jsonWithPanels *simplejson.Json,
if collapsed && collapsedJSON.MustBool() {
// extract alerts from sub panels for collapsed panels
als, err := e.getAlertFromPanels(panel, validateAlertFunc)
alertSlice, err := e.getAlertFromPanels(panel,
validateAlertFunc)
if err != nil {
return nil, err
}
alerts = append(alerts, als...)
alerts = append(alerts, alertSlice...)
continue
}
+1 -1
View File
@@ -74,7 +74,7 @@ func (this *TeamsNotifier) Notify(evalContext *alerting.EvalContext) error {
}
message := ""
if evalContext.Rule.State != m.AlertStateOK { //dont add message when going back to alert state ok.
if evalContext.Rule.State != m.AlertStateOK { //don't add message when going back to alert state ok.
message = evalContext.Rule.Message
}
@@ -4,7 +4,7 @@
# org_id: 1
# # list of datasources to insert/update depending
# # whats available in the datbase
# # what's available in the datbase
#datasources:
# # <string, required> name of the datasource. Required
# - name: Graphite
+2 -2
View File
@@ -70,7 +70,7 @@ func (rs *RenderingService) renderViaHttp(ctx context.Context, opts Opts) (*Rend
return nil, ErrTimeout
}
// if we didnt get a 200 response, something went wrong.
// if we didn't get a 200 response, something went wrong.
if resp.StatusCode != http.StatusOK {
rs.log.Error("Remote rendering request failed", "error", resp.Status)
return nil, fmt.Errorf("Remote rendering request failed. %d: %s", resp.StatusCode, resp.Status)
@@ -83,7 +83,7 @@ func (rs *RenderingService) renderViaHttp(ctx context.Context, opts Opts) (*Rend
defer out.Close()
_, err = io.Copy(out, resp.Body)
if err != nil {
// check that we didnt timeout while receiving the response.
// check that we didn't timeout while receiving the response.
if reqContext.Err() == context.DeadlineExceeded {
rs.log.Info("Rendering timed out")
return nil, ErrTimeout
+1 -1
View File
@@ -45,7 +45,7 @@ func (rs *RenderingService) Init() error {
// set value used for domain attribute of renderKey cookie
if rs.Cfg.RendererUrl != "" {
// RendererCallbackUrl has already been passed, it wont generate an error.
// RendererCallbackUrl has already been passed, it won't generate an error.
u, _ := url.Parse(rs.Cfg.RendererCallbackUrl)
rs.domain = u.Hostname()
} else if setting.HttpAddr != setting.DEFAULT_HTTP_ADDR {
@@ -105,7 +105,7 @@ func addAnnotationMig(mg *Migrator) {
}))
//
// Convert epoch saved as seconds to miliseconds
// Convert epoch saved as seconds to milliseconds
//
updateEpochSql := "UPDATE annotation SET epoch = (epoch*1000) where epoch < 9999999999"
mg.AddMigration("Convert existing annotations from seconds to milliseconds", NewRawSqlMigration(updateEpochSql))
+1 -1
View File
@@ -39,7 +39,7 @@ func TestTransaction(t *testing.T) {
So(err, ShouldEqual, models.ErrInvalidApiKey)
})
Convey("wont update if one handler fails", func() {
Convey("won't update if one handler fails", func() {
err := ss.InTransaction(context.Background(), func(ctx context.Context) error {
err := DeleteApiKeyCtx(ctx, deleteApiKeyCmd)
if err != nil {