Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/segmentio/encoding
/ NewEncoder
Function
NewEncoder
thrift/encode.go:28–30 ·
view source on GitHub ↗
(w Writer)
Source
from the content-addressed store, hash-verified
26
}
27
28
func
NewEncoder(w Writer) *Encoder {
29
return
&Encoder{w: w, f: encoderFlags(w)}
30
}
31
32
func
(e *Encoder) Encode(v any) error {
33
t := reflect.TypeOf(v)
Callers
2
benchmarkMarshal
Function · 0.92
Marshal
Function · 0.70
Calls
1
encoderFlags
Function · 0.85
Tested by
1
benchmarkMarshal
Function · 0.74
Used in the wild
real call sites across dependent graphs
searching dependent graphs…