mirror of https://github.com/grpc/grpc-go.git
Merge pull request #623 from tamird/simplify-minor
minor cleanup: simplify looping
This commit is contained in:
commit
ac6f0e3135
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue