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

Function GetInterfaceString

IceFireDB-Redis-Proxy/utils/func.go:53–65  ·  view source on GitHub ↗
(param any)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected