sijms / go-ora

Pure go oracle client
MIT License
786 stars 174 forks source link

connection_string: remove redundant nil check #421

Closed Juneezee closed 1 year ago

Juneezee commented 1 year ago

An additional nil check for q before the loop is unnecessary because q is a map. A nil map is equivalent to an empty map. (Example: https://go.dev/play/p/EnnDEF7svOd)

Before:

    if q != nil {
        for key, val := range q {
            ...
        }
    }

After:

    for key, val := range q {
        ...
    }