Skip to content

Commit

Permalink
Use ParseBool
Browse files Browse the repository at this point in the history
  • Loading branch information
FPiety0521 authored and FPiety0521 committed Oct 14, 2021
1 parent dfcb727 commit 8d8f9fa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion database/cassandra/cassandra.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,10 @@ func (c *Cassandra) Open(url string) (database.Driver, error) {
}
}

if s := u.Query().Get("disable-host-lookup"); len(s) > 0 {
if flag, err := strconv.ParseBool(u.Query().Get("disable-host-lookup")); err != nil && flag {
cluster.DisableInitialHostLookup = true
} else if err != nil {
return nil, err
}

session, err := cluster.CreateSession()
Expand Down

0 comments on commit 8d8f9fa

Please sign in to comment.