TUN-528: Move cloudflared into a separate repo

This commit is contained in:
Areg Harutyunyan
2018-05-01 18:45:06 -05:00
parent e8c621a648
commit d06fc520c7
4726 changed files with 1763680 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
func (s {{.Node.Name}}) {{.Field.Name|title}}() ({{.FieldType}}, error) {
{{template "_checktag" . -}}
p, err := s.Struct.Ptr({{.Field.Slot.Offset}})
{{with .Default -}}
return {{$.FieldType}}(p.DataDefault({{printf "%#v" .}})), err
{{- else -}}
return {{.FieldType}}(p.Data()), err
{{- end}}
}
{{template "_hasfield" .}}
func (s {{.Node.Name}}) Set{{.Field.Name|title}}(v {{.FieldType}}) error {
{{template "_settag" . -}}
{{if .Default -}}
if v == nil {
v = []byte{}
}
{{end -}}
return s.Struct.SetData({{.Field.Slot.Offset}}, v)
}