MCPcopy
hub / github.com/grpc/grpc-go / nonNilFieldCount

Method nonNilFieldCount

security/advancedtls/advancedtls.go:117–126  ·  view source on GitHub ↗

nonNilFieldCount returns the number of set fields in RootCertificateOptions.

()

Source from the content-addressed store, hash-verified

115
116// nonNilFieldCount returns the number of set fields in RootCertificateOptions.
117func (o RootCertificateOptions) nonNilFieldCount() int {
118 cnt := 0
119 rv := reflect.ValueOf(o)
120 for i := 0; i < rv.NumField(); i++ {
121 if !rv.Field(i).IsNil() {
122 cnt++
123 }
124 }
125 return cnt
126}
127
128// IdentityCertificateOptions contains options to obtain identity certificates
129// for both the client and the server.

Callers 2

clientConfigMethod · 0.45
serverConfigMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected