mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-28 16:39:57 +00:00
TUN-528: Move cloudflared into a separate repo
This commit is contained in:
17
vendor/zombiezen.com/go/capnproto2/capnpc-go/templates/structEnums
generated
vendored
Normal file
17
vendor/zombiezen.com/go/capnproto2/capnpc-go/templates/structEnums
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
type {{.Node.Name}}_Which uint16
|
||||
|
||||
const (
|
||||
{{range .Fields}} {{$.Node.Name}}_Which_{{.Name}} {{$.Node.Name}}_Which = {{.DiscriminantValue}}
|
||||
{{end}}
|
||||
)
|
||||
|
||||
func (w {{.Node.Name}}_Which) String() string {
|
||||
const s = {{.EnumString.ValueString|printf "%q"}}
|
||||
switch w {
|
||||
{{range $i, $f := .Fields}}case {{$.Node.Name}}_Which_{{.Name}}:
|
||||
return s{{$.EnumString.SliceFor $i}}
|
||||
{{end}}
|
||||
}
|
||||
return "{{.Node.Name}}_Which(" + {{.G.Imports.Strconv}}.FormatUint(uint64(w), 10) + ")"
|
||||
}
|
||||
|
Reference in New Issue
Block a user