mirror of
https://github.com/netbirdio/easyjson.git
synced 2026-05-22 18:44:42 -07:00
244a66fa8f
When large amounts of data are unmarshaled for immediate non long live use than copying of strings from original buffer can be avoided and instead a reference to the original buffer returned in the field value. Note, if the value requires unescaping, than it will be processed as normally done with copying. Signed-off-by: Kirill Korotaev <kirillx@gmail.com>
8 lines
109 B
Go
8 lines
109 B
Go
package tests
|
|
|
|
//easyjson:json
|
|
type NocopyStruct struct {
|
|
A string `json:"a"`
|
|
B string `json:"b,nocopy"`
|
|
}
|