mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-28 17:00:00 +00:00
TUN-528: Move cloudflared into a separate repo
This commit is contained in:
9
vendor/zombiezen.com/go/capnproto2/capnpc-go/templates/_hasfield
generated
vendored
Normal file
9
vendor/zombiezen.com/go/capnproto2/capnpc-go/templates/_hasfield
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
func (s {{.Node.Name}}) Has{{.Field.Name|title}}() bool {
|
||||
{{if .Field.HasDiscriminant -}}
|
||||
if s.Struct.Uint16({{.Node.DiscriminantOffset}}) != {{.Field.DiscriminantValue}} {
|
||||
return false
|
||||
}
|
||||
{{end -}}
|
||||
p, err := s.Struct.Ptr({{.Field.Slot.Offset}})
|
||||
return p.IsValid() || err != nil
|
||||
}
|
Reference in New Issue
Block a user