MCPcopy
hub / github.com/apache/devlake / Cast

Function Cast

backend/test/helper/utils.go:76–84  ·  view source on GitHub ↗
(m any)

Source from the content-addressed store, hash-verified

74}
75
76func Cast[T any](m any) T {
77 j := ToJson(m)
78 t := new(T)
79 err := json.Unmarshal(j, t)
80 if err != nil {
81 panic(err)
82 }
83 return *t
84}
85
86func Contains[T any](list []T, elem any) bool {
87 for _, x := range list {

Callers

nothing calls this directly

Calls 1

ToJsonFunction · 0.85

Tested by

no test coverage detected