package protocol import ( "encoding/json" ) type ServerRequest struct { Method string `json:"method"` Params *json.RawMessage `json:"params"` Id *json.RawMessage `json:"id"` } func (r *ServerRequest) reset() { r.Method = "" r.Params = nil r.Id = nil }