Merge pull request #623 from tamird/simplify-minor
minor cleanup: simplify looping
This commit is contained in:
@ -288,10 +288,9 @@ func NewConn(cc *ClientConn) (*Conn, error) {
|
|||||||
if !c.dopts.insecure {
|
if !c.dopts.insecure {
|
||||||
var ok bool
|
var ok bool
|
||||||
for _, cd := range c.dopts.copts.AuthOptions {
|
for _, cd := range c.dopts.copts.AuthOptions {
|
||||||
if _, ok := cd.(credentials.TransportAuthenticator); !ok {
|
if _, ok = cd.(credentials.TransportAuthenticator); ok {
|
||||||
continue
|
break
|
||||||
}
|
}
|
||||||
ok = true
|
|
||||||
}
|
}
|
||||||
if !ok {
|
if !ok {
|
||||||
return nil, ErrNoTransportSecurity
|
return nil, ErrNoTransportSecurity
|
||||||
|
Reference in New Issue
Block a user