MCPcopy
hub / github.com/elastic/go-elasticsearch / encode

Method encode

esutil/json_reader.go:92–97  ·  esutil/json_reader.go::JSONReader.encode
(w io.Writer)

Source from the content-addressed store, hash-verified

90}
91
92func (r *JSONReader) encode(w io.Writer) error {
93 if e, ok := r.val.(JSONEncoder); ok {
94 return e.EncodeJSON(w)
95 }
96 return json.NewEncoder(w).Encode(r.val)
97}
98
99type countingWriter struct {
100 io.Writer

Callers 2

ensureEncodedMethod · 0.95
WriteToMethod · 0.95

Calls 1

EncodeJSONMethod · 0.65

Tested by

no test coverage detected