Chore: Remove Wrap (#50048)

* Chore: Remove Wrap and Wrapf

* Fix: Add error check
This commit is contained in:
Kat Yang
2022-06-03 03:24:24 -04:00
committed by GitHub
parent 53cb94a2ad
commit 3c3039f5b3
34 changed files with 104 additions and 117 deletions

View File

@ -18,7 +18,6 @@ import (
"github.com/grafana/grafana-plugin-sdk-go/data/sqlutil"
"github.com/grafana/grafana/pkg/infra/log"
"github.com/grafana/grafana/pkg/tsdb/intervalv2"
"github.com/grafana/grafana/pkg/util/errutil"
"xorm.io/core"
"xorm.io/xorm"
)
@ -823,13 +822,13 @@ func convertNullableFloat32ToEpochMS(origin *data.Field, newField *data.Field) {
func convertSQLTimeColumnsToEpochMS(frame *data.Frame, qm *dataQueryModel) error {
if qm.timeIndex != -1 {
if err := convertSQLTimeColumnToEpochMS(frame, qm.timeIndex); err != nil {
return errutil.Wrap("failed to convert time column", err)
return fmt.Errorf("%v: %w", "failed to convert time column", err)
}
}
if qm.timeEndIndex != -1 {
if err := convertSQLTimeColumnToEpochMS(frame, qm.timeEndIndex); err != nil {
return errutil.Wrap("failed to convert timeend column", err)
return fmt.Errorf("%v: %w", "failed to convert timeend column", err)
}
}