Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing error message for SlowLog conversion #612

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: golangci/golangci-lint-action@v2
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.36
version: v1.46.2

# Optional: working directory, useful for monorepos
# working-directory: somedir
Expand Down
4 changes: 2 additions & 2 deletions redis/reply.go
Expand Up @@ -614,13 +614,13 @@ func SlowLogs(result interface{}, err error) ([]SlowLog, error) {

timestamp, ok := rawLog[1].(int64)
if !ok {
return nil, fmt.Errorf("redigo: slowlog element[1] not an int64, got %T", rawLog[0])
return nil, fmt.Errorf("redigo: slowlog element[1] not an int64, got %T", rawLog[1])
}

log.Time = time.Unix(timestamp, 0)
duration, ok := rawLog[2].(int64)
if !ok {
return nil, fmt.Errorf("redigo: slowlog element[2] not an int64, got %T", rawLog[0])
return nil, fmt.Errorf("redigo: slowlog element[2] not an int64, got %T", rawLog[2])
}

log.ExecutionTime = time.Duration(duration) * time.Microsecond
Expand Down