MCPcopy Index your code
hub / github.com/vmihailenco/msgpack / ResetDict

Method ResetDict

encode.go:106–111  ·  view source on GitHub ↗

ResetDict is like Reset, but also resets the dict.

(w io.Writer, dict map[string]int)

Source from the content-addressed store, hash-verified

104
105// ResetDict is like Reset, but also resets the dict.
106func (e *Encoder) ResetDict(w io.Writer, dict map[string]int) {
107 e.ResetWriter(w)
108 e.flags = 0
109 e.structTag = ""
110 e.dict = dict
111}
112
113func (e *Encoder) WithDict(dict map[string]int, fn func(*Encoder) error) error {
114 oldDict := e.dict

Callers 3

TestResetDictFunction · 0.95
ResetMethod · 0.95

Calls 1

ResetWriterMethod · 0.95

Tested by 2

TestResetDictFunction · 0.76