Skip to content

Commit

Permalink
fix staticcheck errors
Browse files Browse the repository at this point in the history
  • Loading branch information
facundoolano committed Jul 23, 2024
1 parent 5bb6f7b commit c7c5c01
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions db.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (dbs *dbSession) PrepareForUpdate(columns []string) (*time.Time, error) {
return nil, err
}

t, err := timeFromDBFormat(lastSeenTimeStr)
t, _ := timeFromDBFormat(lastSeenTimeStr)
lastSeemTime = &t
}

Expand Down Expand Up @@ -154,7 +154,7 @@ func (dbs *dbSession) QueryTop(spec *RequestCountSpec) ([]string, [][]string, er
}
strValues := make([]string, len(values))
for i, value := range values {
strValues[i] = fmt.Sprintf("%s", *value.(*sql.RawBytes))
strValues[i] = string(*value.(*sql.RawBytes))
}
results = append(results, strValues)
}
Expand Down
4 changes: 1 addition & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,8 @@ func resolveWhereConditions(clauses []string) (map[string][]string, error) {
}
if column, found := FIELD_NAMES[keyvalue[0]]; !found {
return nil, fmt.Errorf("unknown field name %s", keyvalue[0])
} else if _, found := conditions[column]; found {
conditions[column] = append(conditions[column], keyvalue[1])
} else {
conditions[column] = []string{keyvalue[1]}
conditions[column] = append(conditions[column], keyvalue[1])
}
}

Expand Down

0 comments on commit c7c5c01

Please sign in to comment.