Chore: Remove Wrapf (#50128)

* Chore: Remove Wrapf

* Remove all Wrapf refs

* Remove last Wrapf ref

* Fix lint errors

* Remove Wrap and Wrapf definitions

* Remove unnecessary colon
This commit is contained in:
Kat Yang
2022-06-06 16:30:31 -04:00
committed by GitHub
parent 56eb131715
commit 31630edf0c
27 changed files with 62 additions and 107 deletions

View File

@ -16,7 +16,6 @@ import (
"github.com/grafana/grafana/pkg/infra/log"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/tsdb/sqleng"
"github.com/grafana/grafana/pkg/util/errutil"
)
var logger = log.New("tsdb.postgres")
@ -131,7 +130,7 @@ func (s *Service) generateConnectionString(dsInfo sqleng.DataSourceInfo) (string
var err error
port, err = strconv.Atoi(sp[1])
if err != nil {
return "", errutil.Wrapf(err, "invalid port in host specifier %q", sp[1])
return "", fmt.Errorf("invalid port in host specifier %q: %w", sp[1], err)
}
logger.Debug("Generating connection string with network host/port pair", "host", host, "port", port)
@ -144,7 +143,7 @@ func (s *Service) generateConnectionString(dsInfo sqleng.DataSourceInfo) (string
var err error
port, err = strconv.Atoi(dsInfo.URL[index+1:])
if err != nil {
return "", errutil.Wrapf(err, "invalid port in host specifier %q", dsInfo.URL[index+1:])
return "", fmt.Errorf("invalid port in host specifier %q: %w", dsInfo.URL[index+1:], err)
}
logger.Debug("Generating ipv6 connection string with network host/port pair", "host", host, "port", port)