MCPcopy
hub / github.com/google/go-jsonnet / manifestString

Method manifestString

interpreter.go:895–903  ·  view source on GitHub ↗

manifestString expects the value to be a string and returns it.

(buf *bytes.Buffer, v value)

Source from the content-addressed store, hash-verified

893
894// manifestString expects the value to be a string and returns it.
895func (i *interpreter) manifestString(buf *bytes.Buffer, v value) error {
896 switch v := v.(type) {
897 case valueString:
898 buf.WriteString(v.getGoString())
899 return nil
900 default:
901 return makeRuntimeError(fmt.Sprintf("expected string result, got: %s", v.getType().name), i.getCurrentStackTrace())
902 }
903}
904
905func (i *interpreter) manifestAndSerializeMulti(v value, stringOutputMode bool, outputNewline bool) (r map[string]string, err error) {
906 r = make(map[string]string)

Callers 1

evaluateFunction · 0.80

Calls 4

getCurrentStackTraceMethod · 0.95
makeRuntimeErrorFunction · 0.85
getGoStringMethod · 0.65
getTypeMethod · 0.65

Tested by

no test coverage detected