MCPcopy Create free account
hub / github.com/ForestHubAI/edge-agents / AsString

Method AsString

go/engine/expr/value.go:101–117  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

99 return r != 0
100 case string:
101 return r != "" && r != "0" && r != "false"
102 default:
103 return false
104 }
105}
106
107func (v Value) AsString() string {
108 switch r := v.Raw.(type) {
109 case string:
110 return r
111 case int64:
112 return strconv.FormatInt(r, 10)
113 case float64:
114 return strconv.FormatFloat(r, 'f', -1, 64)
115 case bool:
116 if r {
117 return "true"
118 }
119 return "false"
120 default:

Callers 9

CastMethod · 0.95
ApplyMethod · 0.80
TestEval_CastInStringFunction · 0.80
EvalStringFunction · 0.80
evalStringExprFunction · 0.80
valueToLiteralFunction · 0.80
compareValuesFunction · 0.80

Calls

no outgoing calls

Tested by 3

TestEval_CastInStringFunction · 0.64