Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(#1755): GetObject supports overriding response header values #1756

Merged
merged 4 commits into from Jan 18, 2023

Conversation

reedchan7
Copy link
Contributor

This allows you to pass in the response headers that you need to override when calling the GetObject method.

This allows you to pass in the response headers
that you need to override when calling the GetObject method.
@klauspost
Copy link
Contributor

Imports missing in the example:

# command-line-arguments
Error: ./getobject-override-respheaders.go:36:19: undefined: minio
Error: ./getobject-override-respheaders.go:37:11: undefined: credentials
Error: ./getobject-override-respheaders.go:41:3: undefined: log
Error: ./getobject-override-respheaders.go:50:9: undefined: minio
Error: ./getobject-override-respheaders.go:55:36: undefined: context
Error: ./getobject-override-respheaders.go:57:3: undefined: log
Error: ./getobject-override-respheaders.go:63:3: undefined: log
Error: ./getobject-override-respheaders.go:69:3: undefined: log
Error: ./getobject-override-respheaders.go:72:15: undefined: io
Error: ./getobject-override-respheaders.go:73:3: undefined: log
Error: ./getobject-override-respheaders.go:73:3: too many errors
Error: make: *** [Makefile:27: examples] Error 1
Error: Process completed with exit code 2.

@reedchan7
Copy link
Contributor Author

Imports missing in the example:

# command-line-arguments
Error: ./getobject-override-respheaders.go:36:19: undefined: minio
Error: ./getobject-override-respheaders.go:37:11: undefined: credentials
Error: ./getobject-override-respheaders.go:41:3: undefined: log
Error: ./getobject-override-respheaders.go:50:9: undefined: minio
Error: ./getobject-override-respheaders.go:55:36: undefined: context
Error: ./getobject-override-respheaders.go:57:3: undefined: log
Error: ./getobject-override-respheaders.go:63:3: undefined: log
Error: ./getobject-override-respheaders.go:69:3: undefined: log
Error: ./getobject-override-respheaders.go:72:15: undefined: io
Error: ./getobject-override-respheaders.go:73:3: undefined: log
Error: ./getobject-override-respheaders.go:73:3: too many errors
Error: make: *** [Makefile:27: examples] Error 1
Error: Process completed with exit code 2.

Now fixed 👍

@reedchan7
Copy link
Contributor Author

image

These codes are in my forked repo, not in v7.0.32, how to resolve this issue? @harshavardhana

@klauspost
Copy link
Contributor

Seems like the replace needs an update: https://github.com/minio/minio-go/blob/master/examples/s3/go.mod#L23

v7.0.10 -> v7.0.32 should sync it back up again. Probably a go mod tidy is needed.

The version isn't important - it should just match the one above.

update examples/s3/go.mod for github action check;
@reedchan7
Copy link
Contributor Author

Seems like the replace needs an update: https://github.com/minio/minio-go/blob/master/examples/s3/go.mod#L23

v7.0.10 -> v7.0.32 should sync it back up again. Probably a go mod tidy is needed.

The version isn't important - it should just match the one above.

@klauspost
Replace replace github.com/minio/minio-go/v7 v7.0.10 => ../.. to replace github.com/minio/minio-go/v7 v7.0.10 => github.com/reedchan7/minio-go-sdk/v7 v7.0.48-0.20230116044606-89d027d0d418?
Should this change also need to be merged into the master of minio-go?
Isn't it weird to update the replace to my forked repository?

Althoght, this update got my make examples successful:

image

Commit: ddac4e5

@klauspost
Copy link
Contributor

@reedchan7 No - you should keep ../.. it replaces it with whatever version it is using. It should be

replace github.com/minio/minio-go/v7 v7.0.32 => ../..

examples/s3/go.mod Outdated Show resolved Hide resolved
Co-authored-by: Klaus Post <klauspost@gmail.com>
@reedchan7
Copy link
Contributor Author

@reedchan7 No - you should keep ../.. it replaces it with whatever version it is using. It should be

replace github.com/minio/minio-go/v7 v7.0.32 => ../..

I got it. Thanks 😄

Copy link
Contributor

@klauspost klauspost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@harshavardhana harshavardhana merged commit f54fa21 into minio:master Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants