mirror of
https://github.com/TECHNOFAB11/dbmate.git
synced 2026-02-02 09:25:07 +01:00
Add gometalinter (#36)
This commit is contained in:
parent
cacf5de3ec
commit
ee3162c34c
6 changed files with 32 additions and 15 deletions
|
|
@ -182,11 +182,7 @@ func (db *DB) NewMigration(name string) error {
|
|||
|
||||
defer mustClose(file)
|
||||
_, err = file.WriteString(migrationTemplate)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return err
|
||||
}
|
||||
|
||||
func doTransaction(db *sql.DB, txFunc func(Transaction) error) error {
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ func mysqldumpArgs(u *url.URL) []string {
|
|||
if username := u.User.Username(); username != "" {
|
||||
args = append(args, "--user="+username)
|
||||
}
|
||||
// mysql recommands against using environment variables to supply password
|
||||
// mysql recommends against using environment variables to supply password
|
||||
// https://dev.mysql.com/doc/refman/5.7/en/password-security-user.html
|
||||
if password, set := u.User.Password(); set {
|
||||
args = append(args, "--password="+password)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue