aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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))