當前位置: 首頁>>代碼示例>>Golang>>正文


Golang TProtocol.WriteBool方法代碼示例

本文整理匯總了Golang中git/apache/org/thrift/git/lib/go/thrift.TProtocol.WriteBool方法的典型用法代碼示例。如果您正苦於以下問題:Golang TProtocol.WriteBool方法的具體用法?Golang TProtocol.WriteBool怎麽用?Golang TProtocol.WriteBool使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在git/apache/org/thrift/git/lib/go/thrift.TProtocol的用法示例。


在下文中一共展示了TProtocol.WriteBool方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: writeField0

func (p *UpdateResult) writeField0(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("success", thrift.BOOL, 0); err != nil {
		return fmt.Errorf("%T write field begin error 0:success: %s", p, err)
	}
	if err := oprot.WriteBool(bool(p.Success)); err != nil {
		return fmt.Errorf("%T.success (0) field write error: %s", p)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 0:success: %s", p, err)
	}
	return err
}
開發者ID:huacnlee,項目名稱:thrift_example,代碼行數:12,代碼來源:common_service.go

示例2: writeField5

func (p *GetPrivateMessageListArgs) writeField5(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("isReversed", thrift.BOOL, 5); err != nil {
		return fmt.Errorf("%T write field begin error 5:isReversed: %s", p, err)
	}
	if err := oprot.WriteBool(bool(p.IsReversed)); err != nil {
		return fmt.Errorf("%T.isReversed (5) field write error: %s", p, err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 5:isReversed: %s", p, err)
	}
	return err
}
開發者ID:lei-yu,項目名稱:GOPATH,代碼行數:12,代碼來源:privatemessagemanagersync.go

示例3: writeField8

func (p *GetAccessableGroupResourcesArgs) writeField8(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("isReversed", thrift.BOOL, 8); err != nil {
		return fmt.Errorf("%T write field begin error 8:isReversed: %s", p, err)
	}
	if err := oprot.WriteBool(bool(p.IsReversed)); err != nil {
		return fmt.Errorf("%T.isReversed (8) field write error: %s", p, err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 8:isReversed: %s", p, err)
	}
	return err
}
開發者ID:lei-yu,項目名稱:GOPATH,代碼行數:12,代碼來源:accessmanager.go

示例4: writeField4

func (p *GetGroupMessagesArgs) writeField4(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("isReversed", thrift.BOOL, 4); err != nil {
		return fmt.Errorf("%T write field begin error 4:isReversed: %s", p, err)
	}
	if err := oprot.WriteBool(bool(p.IsReversed)); err != nil {
		return fmt.Errorf("%T.isReversed (4) field write error: %s", p, err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 4:isReversed: %s", p, err)
	}
	return err
}
開發者ID:lei-yu,項目名稱:GOPATH,代碼行數:12,代碼來源:chatmanagersync.go

示例5: writeField8

func (p *Person) writeField8(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("Active", thrift.BOOL, 8); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:Active: ", p), err)
	}
	if err := oprot.WriteBool(bool(p.Active)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.Active (8) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 8:Active: ", p), err)
	}
	return err
}
開發者ID:dynastymasra,項目名稱:GoGinThrift,代碼行數:12,代碼來源:ttypes.go

示例6: writeField5

func (p *Coffee) writeField5(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("iced", thrift.BOOL, 5); err != nil {
		return fmt.Errorf("%T write field begin error 5:iced: %s", p, err)
	}
	if err := oprot.WriteBool(bool(p.Iced)); err != nil {
		return fmt.Errorf("%T.iced (5) field write error: %s", p, err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 5:iced: %s", p, err)
	}
	return err
}
開發者ID:RobWC,項目名稱:thrift-coffee,代碼行數:12,代碼來源:ttypes.go

示例7: writeField3

func (p *Student) writeField3(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("ssex", thrift.BOOL, 3); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:ssex: ", p), err)
	}
	if err := oprot.WriteBool(bool(p.Ssex)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.ssex (3) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 3:ssex: ", p), err)
	}
	return err
}
開發者ID:wallacexinyu,項目名稱:Distributed-Productivity-Calendar,代碼行數:12,代碼來源:ttypes.go

示例8: writeField6

func (p *ParticipanteRowItemThrift) writeField6(oprot thrift.TProtocol) (err error) {
	if p.IsSetCessouHabitoFumar() {
		if err := oprot.WriteFieldBegin("cessouHabitoFumar", thrift.BOOL, 6); err != nil {
			return fmt.Errorf("%T write field begin error 6:cessouHabitoFumar: %s", p, err)
		}
		if err := oprot.WriteBool(bool(*p.CessouHabitoFumar)); err != nil {
			return fmt.Errorf("%T.cessouHabitoFumar (6) field write error: %s", p, err)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return fmt.Errorf("%T write field end error 6:cessouHabitoFumar: %s", p, err)
		}
	}
	return err
}
開發者ID:esusab,項目名稱:integracao,代碼行數:14,代碼來源:ttypes.go

示例9: writeField3

func (p *ParticipanteRowItemThrift) writeField3(oprot thrift.TProtocol) (err error) {
	if p.IsSetAvaliacaoAlterada() {
		if err := oprot.WriteFieldBegin("avaliacaoAlterada", thrift.BOOL, 3); err != nil {
			return fmt.Errorf("%T write field begin error 3:avaliacaoAlterada: %s", p, err)
		}
		if err := oprot.WriteBool(bool(*p.AvaliacaoAlterada)); err != nil {
			return fmt.Errorf("%T.avaliacaoAlterada (3) field write error: %s", p, err)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return fmt.Errorf("%T write field end error 3:avaliacaoAlterada: %s", p, err)
		}
	}
	return err
}
開發者ID:esusab,項目名稱:integracao,代碼行數:14,代碼來源:ttypes.go

示例10: writeField0

func (p *DcacheServicePutResult) writeField0(oprot thrift.TProtocol) (err error) {
	if p.IsSetSuccess() {
		if err := oprot.WriteFieldBegin("success", thrift.BOOL, 0); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err)
		}
		if err := oprot.WriteBool(bool(*p.Success)); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err)
		}
	}
	return err
}
開發者ID:nipuntalukdar,項目名稱:NipunTalukdarExamples,代碼行數:14,代碼來源:dcacheservice.go

示例11: writeField7

func (p *BootstrapSettings) writeField7(oprot thrift.TProtocol) (err error) {
	if p.IsSetEnableSupportTickets() {
		if err := oprot.WriteFieldBegin("enableSupportTickets", thrift.BOOL, 7); err != nil {
			return fmt.Errorf("%T write field begin error 7:enableSupportTickets: %s", p, err)
		}
		if err := oprot.WriteBool(bool(p.EnableSupportTickets)); err != nil {
			return fmt.Errorf("%T.enableSupportTickets (7) field write error: %s", p)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return fmt.Errorf("%T write field end error 7:enableSupportTickets: %s", p, err)
		}
	}
	return err
}
開發者ID:quekshuy,項目名稱:evernote-golang-sdk,代碼行數:14,代碼來源:ttypes.go

示例12: writeField12

func (p *BootstrapSettings) writeField12(oprot thrift.TProtocol) (err error) {
	if p.IsSetEnableLinkedInSharing() {
		if err := oprot.WriteFieldBegin("enableLinkedInSharing", thrift.BOOL, 12); err != nil {
			return fmt.Errorf("%T write field begin error 12:enableLinkedInSharing: %s", p, err)
		}
		if err := oprot.WriteBool(bool(p.EnableLinkedInSharing)); err != nil {
			return fmt.Errorf("%T.enableLinkedInSharing (12) field write error: %s", p)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return fmt.Errorf("%T write field end error 12:enableLinkedInSharing: %s", p, err)
		}
	}
	return err
}
開發者ID:quekshuy,項目名稱:evernote-golang-sdk,代碼行數:14,代碼來源:ttypes.go

示例13: writeField10

func (p *FichaVisitaDomiciliarChildThrift) writeField10(oprot thrift.TProtocol) (err error) {
	if p.IsSetStForaArea() {
		if err := oprot.WriteFieldBegin("stForaArea", thrift.BOOL, 10); err != nil {
			return fmt.Errorf("%T write field begin error 10:stForaArea: %s", p, err)
		}
		if err := oprot.WriteBool(bool(*p.StForaArea)); err != nil {
			return fmt.Errorf("%T.stForaArea (10) field write error: %s", p, err)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return fmt.Errorf("%T write field end error 10:stForaArea: %s", p, err)
		}
	}
	return err
}
開發者ID:esusab,項目名稱:integracao,代碼行數:14,代碼來源:ttypes.go

示例14: writeField5

func (p *Types) writeField5(oprot thrift.TProtocol) (err error) {
	if p.IsSetBoolValue() {
		if err := oprot.WriteFieldBegin("bool_value", thrift.BOOL, 5); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:bool_value: ", p), err)
		}
		if err := oprot.WriteBool(bool(*p.BoolValue)); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T.bool_value (5) field write error: ", p), err)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field end error 5:bool_value: ", p), err)
		}
	}
	return err
}
開發者ID:y-okubo,項目名稱:thrift-test,代碼行數:14,代碼來源:ttypes.go

示例15: writeField9

func (p *Span) writeField9(oprot thrift.TProtocol) (err error) {
	if p.IsSetDebug() {
		if err := oprot.WriteFieldBegin("debug", thrift.BOOL, 9); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:debug: ", p), err)
		}
		if err := oprot.WriteBool(bool(p.Debug)); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T.debug (9) field write error: ", p), err)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field end error 9:debug: ", p), err)
		}
	}
	return err
}
開發者ID:elodina,項目名稱:go-zipkin,代碼行數:14,代碼來源:ttypes.go


注:本文中的git/apache/org/thrift/git/lib/go/thrift.TProtocol.WriteBool方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。