Chore/fix lint issues (#27704)

* Chore: Fix linting issues

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
Arve Knudsen
2020-09-22 16:22:19 +02:00
committed by GitHub
parent ffc11cb63c
commit a5d9196a53
70 changed files with 274 additions and 276 deletions

View File

@ -58,7 +58,7 @@ func newPostgresQueryEndpoint(datasource *models.DataSource) (tsdb.TsdbQueryEndp
// escape single quotes and backslashes in Postgres connection string parameters.
func escape(input string) string {
return strings.Replace(strings.Replace(input, `\`, `\\`, -1), "'", `\'`, -1)
return strings.ReplaceAll(strings.ReplaceAll(input, `\`, `\\`), "'", `\'`)
}
func generateConnectionString(datasource *models.DataSource, logger log.Logger) (string, error) {