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

Function SpreadInterface

key/key_manager.go:87–94  ·  view source on GitHub ↗

SpreadInterface likes Spread, but returns a slice of interface{}

(k contract.Keyer)

Source from the content-addressed store, hash-verified

85
86// SpreadInterface likes Spread, but returns a slice of interface{}
87func SpreadInterface(k contract.Keyer) []interface{} {
88 spreader := k.Spread()
89 out := make([]interface{}, len(spreader))
90 for i := range k.Spread() {
91 out[i] = interface{}(spreader[i])
92 }
93 return out
94}
95
96// KeepOdd only retains the odd values in the contract.Keyer. Note: The
97// alternating key-values count from zero. Odd values are the "value" in

Callers

nothing calls this directly

Calls 1

SpreadMethod · 0.65

Tested by

no test coverage detected