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

add io.SeekEnd support #16

Merged
merged 5 commits into from
May 4, 2024
Merged

Conversation

yxxhero
Copy link
Contributor

@yxxhero yxxhero commented May 2, 2024

add io.SeekEnd support

Signed-off-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
@yxxhero
Copy link
Contributor Author

yxxhero commented May 2, 2024

@nikolaydubina should I fix the test error? I saw all the past PRs. all failed.

@nikolaydubina
Copy link
Owner

hey, thanks for pointing this out!

I think io.SeekEnd does not mean we are jumping to end of reader.

instead, it means that we are counting offset relatively to the end of reader.

this means, we have to consider offset. https://pkg.go.dev/io#SeekEnd

other discussions on mechanics

also, we need test for this. do you mind to add test for this behavior as well? (I just broken tests due to security leak of my AWS tokens, so if you figure out how to use anonymous credentials: https://pkg.go.dev/github.com/aws/aws-sdk-go/aws/credentials#AnonymousCredentials + some public file, file used now should also be public, but if you find better file it is also good :) )

@nikolaydubina
Copy link
Owner

past PRs failed mostly because of Dependabot. I configured both A) Dependabot and B) approved GitHub Actions to use my same AWS tokens.

but this is not good. I dropped my tokens now. we need to use anonymous credentials for this pipeline.

@yxxhero
Copy link
Contributor Author

yxxhero commented May 2, 2024

@nikolaydubina updated. please see the logic. if it's ok, I will add tests.

@nikolaydubina
Copy link
Owner

I thinks this is about right. now need tests for this. please rebase, I fixed tests!

@yxxhero
Copy link
Contributor Author

yxxhero commented May 3, 2024

Thanks. I have done it.

Signed-off-by: yxxhero <aiopsclub@163.com>
@yxxhero
Copy link
Contributor Author

yxxhero commented May 3, 2024

@nikolaydubina tests added.

Copy link
Owner

@nikolaydubina nikolaydubina left a comment

Choose a reason for hiding this comment

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

yes, this would do! thanks for adding this!

@nikolaydubina nikolaydubina merged commit fa4a87e into nikolaydubina:master May 4, 2024
1 check passed
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.

2 participants