Make golint happy (#165)

This commit is contained in:
Adrian Macneil 2020-10-30 19:04:02 +13:00 committed by GitHub
parent 2b3f59fbe3
commit af41fbfb4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 5 deletions

View file

@ -5,6 +5,7 @@ linters:
- depguard - depguard
- errcheck - errcheck
- goimports - goimports
- golint
- gosimple - gosimple
- govet - govet
- ineffassign - ineffassign

View file

@ -17,7 +17,7 @@ RUN apt-get update \
# golangci-lint # golangci-lint
RUN curl -fsSL -o /tmp/lint-install.sh https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh \ RUN curl -fsSL -o /tmp/lint-install.sh https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh \
&& chmod +x /tmp/lint-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 && rm -f /tmp/lint-install.sh
# download modules # download modules

View file

@ -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) db := newTestDB(t, u)
// drop, recreate, and migrate database // drop, recreate, and migrate database
@ -387,6 +387,6 @@ func testStatusUrl(t *testing.T, u *url.URL) {
func TestStatus(t *testing.T) { func TestStatus(t *testing.T) {
for _, u := range testURLs(t) { for _, u := range testURLs(t) {
testStatusUrl(t, u) testStatusURL(t, u)
} }
} }

View file

@ -129,9 +129,9 @@ func queryColumn(db *sql.DB, query string) ([]string, error) {
} }
func printVerbose(result sql.Result) { func printVerbose(result sql.Result) {
lastInsertId, err := result.LastInsertId() lastInsertID, err := result.LastInsertId()
if err == nil { if err == nil {
fmt.Printf("Last insert ID: %d\n", lastInsertId) fmt.Printf("Last insert ID: %d\n", lastInsertID)
} }
rowsAffected, err := result.RowsAffected() rowsAffected, err := result.RowsAffected()
if err == nil { if err == nil {