@@ -181,7 +181,7 @@ func (p *Postgres) Open(url string) (database.Driver, error) {
181181 if s := purl .Query ().Get ("x-migrations-table-quoted" ); len (s ) > 0 {
182182 migrationsTableQuoted , err = strconv .ParseBool (s )
183183 if err != nil {
184- return nil , fmt .Errorf ("Unable to parse option x-migrations-table-quoted: %w" , err )
184+ return nil , fmt .Errorf ("unable to parse option x-migrations-table-quoted: %w" , err )
185185 }
186186 }
187187 if (len (migrationsTable ) > 0 ) && (migrationsTableQuoted ) && ((migrationsTable [0 ] != '"' ) || (migrationsTable [len (migrationsTable )- 1 ] != '"' )) {
@@ -212,7 +212,7 @@ func (p *Postgres) Open(url string) (database.Driver, error) {
212212 if s := purl .Query ().Get ("x-multi-statement" ); len (s ) > 0 {
213213 multiStatementEnabled , err = strconv .ParseBool (s )
214214 if err != nil {
215- return nil , fmt .Errorf ("Unable to parse option x-multi-statement: %w" , err )
215+ return nil , fmt .Errorf ("unable to parse option x-multi-statement: %w" , err )
216216 }
217217 }
218218
@@ -412,7 +412,7 @@ func (p *Postgres) runStatement(statement []byte) error {
412412
413413func computeLineFromPos (s string , pos int ) (line uint , col uint , ok bool ) {
414414 // replace crlf with lf
415- s = strings .Replace (s , "\r \n " , "\n " , - 1 )
415+ s = strings .ReplaceAll (s , "\r \n " , "\n " )
416416 // pg docs: pos uses index 1 for the first character, and positions are measured in characters not bytes
417417 runes := []rune (s )
418418 if pos > len (runes ) {
@@ -613,5 +613,5 @@ func quoteIdentifier(name string) string {
613613 if end > - 1 {
614614 name = name [:end ]
615615 }
616- return `"` + strings .Replace (name , `"` , `""` , - 1 ) + `"`
616+ return `"` + strings .ReplaceAll (name , `"` , `""` ) + `"`
617617}
0 commit comments