MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / GetInterfaceString

Function GetInterfaceString

IceFireDB-PubSub/utils/func.go:52–64  ·  view source on GitHub ↗
(param any)

Source from the content-addressed store, hash-verified

50}
51
52func GetInterfaceString(param any) string {
53 switch param := param.(type) {
54 case []byte:
55 return string(param)
56 case string:
57 return param
58 case int:
59 return strconv.Itoa(param)
60 case float64:
61 return strconv.Itoa(int(param))
62 }
63 return ""
64}
65
66func InArray(in string, array []string) bool {
67 return slices.Contains(array, in)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected