Source File
attributes.go
Belonging Package
google.golang.org/grpc/attributes
package attributes
import
type Attributes struct {
m map[interface{}]interface{}
}
func ( *Attributes) ( ...interface{}) *Attributes {
if == nil {
return New(...)
}
if len()%2 != 0 {
panic(fmt.Sprintf("attributes.New called with unexpected input: len(kvs) = %v", len()))
}
:= &Attributes{m: make(map[interface{}]interface{}, len(.m)+len()/2)}
for , := range .m {
.m[] =
}
for := 0; < len()/2; ++ {
.m[[*2]] = [*2+1]
}
return
}
func ( *Attributes) ( interface{}) interface{} {
if == nil {
return nil
}
return .m[]
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |