MCPcopy Create free account
hub / github.com/DoNewsCode/core / With

Function With

key/key_manager.go:80–84  ·  view source on GitHub ↗

With returns a new manager with added alternating key values. Note: manager is immutable. With Creates a new instance.

(k contract.Keyer, parts ...string)

Source from the content-addressed store, hash-verified

78// With returns a new manager with added alternating key values.
79// Note: manager is immutable. With Creates a new instance.
80func With(k contract.Keyer, parts ...string) manager {
81 km := manager{}
82 parts = append(k.Spread(), parts...)
83 return km.With(parts...)
84}
85
86// SpreadInterface likes Spread, but returns a slice of interface{}
87func SpreadInterface(k contract.Keyer) []interface{} {

Callers 1

ExampleWithFunction · 0.92

Calls 2

WithMethod · 0.95
SpreadMethod · 0.65

Tested by 1

ExampleWithFunction · 0.74