MCPcopy Create free account
hub / github.com/araddon/qlbridge / String

Method String

expr/node.go:864–880  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

862 return false
863}
864func (m *ValueNode) String() string {
865 switch vt := m.Value.(type) {
866 case value.StringsValue:
867 vals := make([]string, vt.Len())
868 for i, v := range vt.Val() {
869 vals[i] = fmt.Sprintf("%q", v)
870 }
871 return fmt.Sprintf("[%s]", strings.Join(vals, ", "))
872 case value.SliceValue:
873 vals := make([]string, vt.Len())
874 for i, v := range vt.Val() {
875 vals[i] = fmt.Sprintf("%q", v.ToString())
876 }
877 return fmt.Sprintf("[%s]", strings.Join(vals, ", "))
878 }
879 return m.Value.ToString()
880}
881func (m *ValueNode) WriteDialect(w DialectWriter) {
882 switch vt := m.Value.(type) {
883 case value.StringsValue:

Callers

nothing calls this directly

Calls 3

LenMethod · 0.65
ToStringMethod · 0.65
ValMethod · 0.45

Tested by

no test coverage detected