Skip to content

Commit

Permalink
Update imported package
Browse files Browse the repository at this point in the history
Fix assertion
  • Loading branch information
mostafa committed Jan 2, 2024
1 parent 213d6d9 commit 038b601
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions databases/postgres/query_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package postgres
import (
"fmt"

pgAnalyze "github.com/pganalyze/pg_query_go/v4"
pgAnalyze "github.com/pganalyze/pg_query_go/v5"
pgQuery "github.com/wasilibs/go-pgquery"
)

Expand All @@ -13,8 +13,8 @@ const MinPgSQLMessageLength = 5
func GetQueryFromRequest(req interface{}) (string, error) {
var requestDecoded []byte

if req, ok := req.([]byte); ok {
requestDecoded = req
if request, ok := req.([]byte); ok {
requestDecoded = request
} else {
return "", fmt.Errorf("unknown request type: %T", req)
}
Expand Down

0 comments on commit 038b601

Please sign in to comment.