mirror of
https://github.com/TECHNOFAB11/dbmate.git
synced 2026-02-02 09:25:07 +01:00
Make golint happy (#165)
This commit is contained in:
parent
2b3f59fbe3
commit
af41fbfb4e
4 changed files with 6 additions and 5 deletions
|
|
@ -5,6 +5,7 @@ linters:
|
|||
- depguard
|
||||
- errcheck
|
||||
- goimports
|
||||
- golint
|
||||
- gosimple
|
||||
- govet
|
||||
- ineffassign
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ RUN apt-get update \
|
|||
# golangci-lint
|
||||
RUN curl -fsSL -o /tmp/lint-install.sh https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh \
|
||||
&& chmod +x /tmp/lint-install.sh \
|
||||
&& /tmp/lint-install.sh -b /usr/local/bin v1.31.0 \
|
||||
&& /tmp/lint-install.sh -b /usr/local/bin v1.32.0 \
|
||||
&& rm -f /tmp/lint-install.sh
|
||||
|
||||
# download modules
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@ func TestRollback(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func testStatusUrl(t *testing.T, u *url.URL) {
|
||||
func testStatusURL(t *testing.T, u *url.URL) {
|
||||
db := newTestDB(t, u)
|
||||
|
||||
// drop, recreate, and migrate database
|
||||
|
|
@ -387,6 +387,6 @@ func testStatusUrl(t *testing.T, u *url.URL) {
|
|||
|
||||
func TestStatus(t *testing.T) {
|
||||
for _, u := range testURLs(t) {
|
||||
testStatusUrl(t, u)
|
||||
testStatusURL(t, u)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -129,9 +129,9 @@ func queryColumn(db *sql.DB, query string) ([]string, error) {
|
|||
}
|
||||
|
||||
func printVerbose(result sql.Result) {
|
||||
lastInsertId, err := result.LastInsertId()
|
||||
lastInsertID, err := result.LastInsertId()
|
||||
if err == nil {
|
||||
fmt.Printf("Last insert ID: %d\n", lastInsertId)
|
||||
fmt.Printf("Last insert ID: %d\n", lastInsertID)
|
||||
}
|
||||
rowsAffected, err := result.RowsAffected()
|
||||
if err == nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue