aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Majewsky <majewsky@gmx.net>2018-02-16 17:12:18 +0100
committerStefan Majewsky <majewsky@gmx.net>2018-02-16 17:12:18 +0100
commitea24c3530752373890b9cdfc23b44d76a9817fa9 (patch)
tree736d865b224f94ebcd37dd47dda71b949b8e56c0
parent6be5f143bf7abd39129145d310980c8ab3c47203 (diff)
downloadgo-schwift-ea24c3530752373890b9cdfc23b44d76a9817fa9.tar.gz
fix doc
-rw-r--r--generated.go20
-rw-r--r--generated.go.in8
2 files changed, 12 insertions, 16 deletions
diff --git a/generated.go b/generated.go
index a50c418..2c109c1 100644
--- a/generated.go
+++ b/generated.go
@@ -24,13 +24,9 @@ func (h AccountHeaders) Clear(key string) {
h[textproto.CanonicalMIMEHeaderKey(key)] = ""
}
-//Del deletes a key from the Headers instance. When the Headers instance
-//is then sent to the server with Update(), Del() has different effects
-//depending on context because of Swift's inconsistent API:
-//
-//For most writable attributes, a key which has been deleted with Del() will
-//remain unchanged on the server. To remove the key on the server, use Clear()
-//instead.
+//Del deletes a key from the Headers instance. When the Headers instance is
+//then sent to the server with Update(), a key which has been deleted with
+//Del() will remain unchanged on the server.
func (h AccountHeaders) Del(key string) {
delete(h, textproto.CanonicalMIMEHeaderKey(key))
}
@@ -133,13 +129,9 @@ func (h ContainerHeaders) Clear(key string) {
h[textproto.CanonicalMIMEHeaderKey(key)] = ""
}
-//Del deletes a key from the Headers instance. When the Headers instance
-//is then sent to the server with Update(), Del() has different effects
-//depending on context because of Swift's inconsistent API:
-//
-//For most writable attributes, a key which has been deleted with Del() will
-//remain unchanged on the server. To remove the key on the server, use Clear()
-//instead.
+//Del deletes a key from the Headers instance. When the Headers instance is
+//then sent to the server with Update(), a key which has been deleted with
+//Del() will remain unchanged on the server.
func (h ContainerHeaders) Del(key string) {
delete(h, textproto.CanonicalMIMEHeaderKey(key))
}
diff --git a/generated.go.in b/generated.go.in
index 4a831d2..85c257a 100644
--- a/generated.go.in
+++ b/generated.go.in
@@ -74,7 +74,8 @@ type {{$htype}}Headers map[string]string
func (h {{$htype}}Headers) Clear(key string) {
h[textproto.CanonicalMIMEHeaderKey(key)] = ""
}
-
+{{/* */}}
+{{- if eq $htype "Object" }}
//Del deletes a key from the Headers instance. When the Headers instance
//is then sent to the server with Update(), Del() has different effects
//depending on context because of Swift's inconsistent API:
@@ -82,11 +83,14 @@ func (h {{$htype}}Headers) Clear(key string) {
//For most writable attributes, a key which has been deleted with Del() will
//remain unchanged on the server. To remove the key on the server, use Clear()
//instead.
-{{- if eq $htype "Object" }}
//
//For object metadata (but not other object attributes), deleting a key will
//cause that key to be deleted on the server. Del() is identical to Clear() in
//this case.
+{{- else }}
+//Del deletes a key from the Headers instance. When the Headers instance is
+//then sent to the server with Update(), a key which has been deleted with
+//Del() will remain unchanged on the server.
{{- end }}
func (h {{$htype}}Headers) Del(key string) {
delete(h, textproto.CanonicalMIMEHeaderKey(key))