mirror of
https://github.com/versity/versitygw.git
synced 2026-07-29 19:42:57 +00:00
test: remove eval, go command generation overhaul
This commit is contained in:
@@ -4,14 +4,14 @@ import (
|
||||
"errors"
|
||||
)
|
||||
|
||||
func NewPutObjectCommand(s3Command *S3Command) (*S3Command, error) {
|
||||
if s3Command.BucketName == "" {
|
||||
func NewPutObjectCommand(s3Command *S3RequestBuilder) (*S3RequestBuilder, error) {
|
||||
if s3Command.Config.BucketName == "" {
|
||||
return nil, errors.New("PutObject must have bucket name")
|
||||
}
|
||||
if s3Command.ObjectKey == "" {
|
||||
if s3Command.Config.ObjectKey == "" {
|
||||
return nil, errors.New("PutObject must have object key")
|
||||
}
|
||||
s3Command.Method = "PUT"
|
||||
s3Command.Query = ""
|
||||
s3Command.Config.Method = "PUT"
|
||||
s3Command.Config.Query = ""
|
||||
return s3Command, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user