func (p *Manylists) writeField2(oprot thrift.TProtocol) (err thrift.TProtocolException) { if p.I16list != nil { if p.IsSetI16list() { err = oprot.WriteFieldBegin("i16list", thrift.LIST, 2) if err != nil { return thrift.NewTProtocolExceptionWriteField(2, "i16list", p.ThriftName(), err) } err = oprot.WriteListBegin(thrift.I16, len(p.I16list)) if err != nil { return thrift.NewTProtocolExceptionWriteField(-1, "", "list", err) } for _, Iter78 := range p.I16list { err = oprot.WriteI16(int16(Iter78)) if err != nil { return thrift.NewTProtocolExceptionWriteField(0, "Iter78", "", err) } } err = oprot.WriteListEnd() if err != nil { return thrift.NewTProtocolExceptionWriteField(-1, "", "list", err) } err = oprot.WriteFieldEnd() if err != nil { return thrift.NewTProtocolExceptionWriteField(2, "i16list", p.ThriftName(), err) } } } return err }
func (p *Manymaps) writeField2(oprot thrift.TProtocol) (err thrift.TProtocolException) { if p.I16map != nil { if p.IsSetI16map() { err = oprot.WriteFieldBegin("i16map", thrift.MAP, 2) if err != nil { return thrift.NewTProtocolExceptionWriteField(2, "i16map", p.ThriftName(), err) } err = oprot.WriteMapBegin(thrift.I16, thrift.STRING, len(p.I16map)) if err != nil { return thrift.NewTProtocolExceptionWriteField(-1, "", "map", err) } for Kiter83, Viter84 := range p.I16map { err = oprot.WriteI16(int16(Kiter83)) if err != nil { return thrift.NewTProtocolExceptionWriteField(0, "Kiter83", "", err) } err = oprot.WriteString(Viter84) if err != nil { return thrift.NewTProtocolExceptionWriteField(0, "Viter84", "", err) } } err = oprot.WriteMapEnd() if err != nil { return thrift.NewTProtocolExceptionWriteField(-1, "", "map", err) } err = oprot.WriteFieldEnd() if err != nil { return thrift.NewTProtocolExceptionWriteField(2, "i16map", p.ThriftName(), err) } } } return err }
func (p *MyMethodArgs) writeField3(oprot thrift.TProtocol) (err thrift.TProtocolException) { err = oprot.WriteFieldBegin("second", thrift.I16, 3) if err != nil { return thrift.NewTProtocolExceptionWriteField(3, "second", p.ThriftName(), err) } err = oprot.WriteI16(int16(p.Second)) if err != nil { return thrift.NewTProtocolExceptionWriteField(3, "second", p.ThriftName(), err) } err = oprot.WriteFieldEnd() if err != nil { return thrift.NewTProtocolExceptionWriteField(3, "second", p.ThriftName(), err) } return err }