本文整理汇总了Golang中github.com/calmh/xdr.Padding函数的典型用法代码示例。如果您正苦于以下问题:Golang Padding函数的具体用法?Golang Padding怎么用?Golang Padding使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Padding函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: XDRSize
func (o ClusterConfigMessage) XDRSize() int {
return 4 + len(o.DeviceName) + xdr.Padding(len(o.DeviceName)) +
4 + len(o.ClientName) + xdr.Padding(len(o.ClientName)) +
4 + len(o.ClientVersion) + xdr.Padding(len(o.ClientVersion)) +
4 + xdr.SizeOfSlice(o.Folders) +
4 + xdr.SizeOfSlice(o.Options)
}
示例2: XDRSize
func (o Device) XDRSize() int {
return 4 + len(o.ID) + xdr.Padding(len(o.ID)) +
4 + len(o.Name) + xdr.Padding(len(o.Name)) +
4 + xdr.SizeOfSlice(o.Addresses) + 4 +
4 + len(o.CertName) + xdr.Padding(len(o.CertName)) + 8 + 4 +
4 + xdr.SizeOfSlice(o.Options)
}
示例3: XDRSize
func (o XDRBenchStruct) XDRSize() int {
return 8 + 4 + 4 + 4 +
4 + len(o.Bs0) + xdr.Padding(len(o.Bs0)) +
4 + len(o.Bs1) + xdr.Padding(len(o.Bs1)) +
4 + len(o.Is0)*4 +
4 + len(o.S0) + xdr.Padding(len(o.S0)) +
4 + len(o.S1) + xdr.Padding(len(o.S1))
}
示例4: XDRSize
func (o TestStruct) XDRSize() int {
return 4 + 8 + 4 + 4 + 4 + 4 + 4 + 4 + 8 + 8 +
4 + len(o.BS) + xdr.Padding(len(o.BS)) +
4 + len(o.S) + xdr.Padding(len(o.S)) +
o.C.XDRSize() +
4 + xdr.SizeOfSlice(o.SS) +
o.ES.XDRSize() +
o.OS.XDRSize() +
4 + xdr.SizeOfSlice(o.OSs)
}
示例5: XDRSize
func (o ConnectRequest) XDRSize() int {
return 4 + len(o.ID) + xdr.Padding(len(o.ID))
}
示例6: XDRSize
func (o Version13HelloMessage) XDRSize() int {
return 4 + len(o.DeviceName) + xdr.Padding(len(o.DeviceName)) +
4 + len(o.ClientName) + xdr.Padding(len(o.ClientName)) +
4 + len(o.ClientVersion) + xdr.Padding(len(o.ClientVersion))
}
示例7: XDRSize
func (o Relay) XDRSize() int {
return 4 + len(o.URL) + xdr.Padding(len(o.URL)) + 4
}
示例8: XDRSize
func (o XDRA) XDRSize() int {
return 4 + len(o.Name) + xdr.Padding(len(o.Name)) + 8 +
4 + len(o.Phone) + xdr.Padding(len(o.Phone)) + 4 + 4 + 8
}
示例9: XDRSize
func (o fileVersion) XDRSize() int {
return o.version.XDRSize() +
4 + len(o.device) + xdr.Padding(len(o.device))
}