MCPcopy
hub / github.com/openai/openai-go / marshalString

Function marshalString

shared/constant/constants.go:1422–1428  ·  view source on GitHub ↗
(v T)

Source from the content-addressed store, hash-verified

1420}
1421
1422func marshalString[T ~string, PT constant[T]](v T) ([]byte, error) {
1423 var zero T
1424 if v == zero {
1425 v = PT(&v).Default()
1426 }
1427 return shimjson.Marshal(string(v))
1428}

Callers 15

MarshalJSONMethod · 0.85
MarshalJSONMethod · 0.85
MarshalJSONMethod · 0.85
MarshalJSONMethod · 0.85
MarshalJSONMethod · 0.85
MarshalJSONMethod · 0.85
MarshalJSONMethod · 0.85
MarshalJSONMethod · 0.85
MarshalJSONMethod · 0.85
MarshalJSONMethod · 0.85
MarshalJSONMethod · 0.85
MarshalJSONMethod · 0.85

Calls 1

DefaultMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…