MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / Scan

Method Scan

model/plugin_model/type.go:38–69  ·  view source on GitHub ↗
(src any)

Source from the content-addressed store, hash-verified

36}
37
38func (k *Kind) Scan(src any) error {
39 switch v := src.(type) {
40 case string:
41 *k = ParseKind(v)
42 case []byte:
43 *k = ParseKind(string(v))
44 case int:
45 *k = Kind(v)
46 case int64:
47 *k = Kind(v)
48 case int32:
49 *k = Kind(v)
50 case int16:
51 *k = Kind(v)
52 case int8:
53 *k = Kind(v)
54 case uint:
55 *k = Kind(v)
56 case uint64:
57 *k = Kind(v)
58 case uint32:
59 *k = Kind(v)
60 case uint16:
61 *k = Kind(v)
62 case uint8:
63 *k = Kind(v)
64
65 default:
66 *k = OpenKind
67 }
68 return nil
69}
70
71func ParseKind(string2 string) Kind {
72 switch string2 {

Callers 6

CountMethod · 0.45
parseAIResponseFunction · 0.45
matchLabelsFunction · 0.45
deleteByLabelsMethod · 0.45
VersionMethod · 0.45
VersionsMethod · 0.45

Calls 2

ParseKindFunction · 0.85
KindTypeAlias · 0.70

Tested by

no test coverage detected