File tree 2 files changed +6
-1
lines changed
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 14
14
runs-on : ubuntu-latest
15
15
strategy :
16
16
matrix :
17
- go-version : [ 1.21.0 ]
17
+ go-version : [ 1.21.4 ]
18
18
steps :
19
19
- name : Check out code into the Go module directory
20
20
uses : actions/checkout@v3
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ type PutObjectOptions struct {
77
77
ContentDisposition string
78
78
ContentLanguage string
79
79
CacheControl string
80
+ Expires time.Time
80
81
Mode RetentionMode
81
82
RetainUntilDate time.Time
82
83
ServerSideEncryption encrypt.ServerSide
@@ -153,6 +154,10 @@ func (opts PutObjectOptions) Header() (header http.Header) {
153
154
header .Set ("Cache-Control" , opts .CacheControl )
154
155
}
155
156
157
+ if ! opts .Expires .IsZero () {
158
+ header .Set ("Expires" , opts .Expires .UTC ().Format (http .TimeFormat ))
159
+ }
160
+
156
161
if opts .Mode != "" {
157
162
header .Set (amzLockMode , opts .Mode .String ())
158
163
}
You can’t perform that action at this time.
0 commit comments