MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / QuickSetStr

Function QuickSetStr

pkg/util/dbutil/dbutil.go:14–29  ·  view source on GitHub ↗
(strVal *string, m map[string]any, name string)

Source from the content-addressed store, hash-verified

12)
13
14func QuickSetStr(strVal *string, m map[string]any, name string) {
15 v, ok := m[name]
16 if !ok {
17 return
18 }
19 ival, ok := v.(int64)
20 if ok {
21 *strVal = strconv.FormatInt(ival, 10)
22 return
23 }
24 str, ok := v.(string)
25 if !ok {
26 return
27 }
28 *strVal = str
29}
30
31func QuickSetInt(ival *int, m map[string]any, name string) {
32 v, ok := m[name]

Callers 1

FromDBMapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected