MCPcopy Create free account
hub / github.com/baidu/EasyFaaS / IntKeySet

Function IntKeySet

pkg/funclet/runtime/cgroup/utils.go:40–48  ·  view source on GitHub ↗

IntKeySet creates a Int from a keys of a map[int](? extends interface{}). If the value passed in is not actually a map, this will panic.

(theMap interface{})

Source from the content-addressed store, hash-verified

38// IntKeySet creates a Int from a keys of a map[int](? extends interface{}).
39// If the value passed in is not actually a map, this will panic.
40func IntKeySet(theMap interface{}) Int {
41 v := reflect.ValueOf(theMap)
42 ret := Int{}
43
44 for _, keyValue := range v.MapKeys() {
45 ret.Insert(keyValue.Interface().(int))
46 }
47 return ret
48}
49
50// Insert adds items to the set.
51func (s Int) Insert(items ...int) {

Callers

nothing calls this directly

Calls 1

InsertMethod · 0.95

Tested by

no test coverage detected