aboutsummaryrefslogtreecommitdiff
path: root/generated.go.in
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@sap.com>2022-10-26 11:31:22 +0200
committerSandro Jäckel <sandro.jaeckel@sap.com>2022-10-26 14:05:42 +0200
commit04ce17415f25dbf10eba954212c8428ae630df88 (patch)
tree1aca7ceab052f17a44bb903fb5a8bd45202bd54c /generated.go.in
parentfd6e57b6239655722884a49a86be0f051cc32bde (diff)
downloadgo-schwift-04ce17415f25dbf10eba954212c8428ae630df88.tar.gz
Format with go 1.19
Diffstat (limited to 'generated.go.in')
-rw-r--r--generated.go.in22
1 files changed, 11 insertions, 11 deletions
diff --git a/generated.go.in b/generated.go.in
index 2858bcb..3f4dcd4 100644
--- a/generated.go.in
+++ b/generated.go.in
@@ -59,25 +59,25 @@ package schwift
{{- range $htype, $hmeta := . }}
-//{{$htype}}Headers contains the headers for a schwift.{{$htype}} instance.
+// {{$htype}}Headers contains the headers for a schwift.{{$htype}} instance.
//
-//To read and write well-known headers, use the methods on this type.
-//To read and write arbitary headers, use the methods on the Headers supertype.
+// To read and write well-known headers, use the methods on this type.
+// To read and write arbitrary headers, use the methods on the Headers supertype.
type {{$htype}}Headers struct {
Headers
}
-//New{{$htype}}Headers creates a new {{$htype}}Headers instance. The return value
-//will have the Headers attribute initialized to a non-nil map.
+// New{{$htype}}Headers creates a new {{$htype}}Headers instance. The return value
+// will have the Headers attribute initialized to a non-nil map.
func New{{$htype}}Headers() {{$htype}}Headers {
return {{$htype}}Headers{make(Headers)}
}
-//Validate returns MalformedHeaderError if the value of any well-known header
-//does not conform to its data type. This is called automatically by Schwift
-//when preparing an {{$htype}}Headers instance from a GET/HEAD response, so you
-//usually do not need to do it yourself. You will get the validation error from
-//the {{$htype}} method doing the request, e.g. Headers().
+// Validate returns MalformedHeaderError if the value of any well-known header
+// does not conform to its data type. This is called automatically by Schwift
+// when preparing an {{$htype}}Headers instance from a GET/HEAD response, so you
+// usually do not need to do it yourself. You will get the validation error from
+// the {{$htype}} method doing the request, e.g. Headers().
func (h {{$htype}}Headers) Validate() error {
{{- range $field := $hmeta.Fields }}
if err := h.{{$field.Attribute}}().validate(); err != nil {
@@ -89,7 +89,7 @@ func (h {{$htype}}Headers) Validate() error {
{{- range $field := $hmeta.Fields }}
-//{{$field.Attribute}} provides type-safe access to {{$field.Header}} headers.
+// {{$field.Attribute}} provides type-safe access to {{$field.Header}} headers.
func (h {{$htype}}Headers) {{$field.Attribute}}() Field{{$field.Type}} {
return Field{{$field.Type}}{h.Headers, "{{$field.Header}}"}
}