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

archive/zip: improve Writer.Create documentation on how to add directories #24018

Closed
gonutz opened this issue Feb 21, 2018 · 6 comments
Closed

archive/zip: improve Writer.Create documentation on how to add directories #24018

gonutz opened this issue Feb 21, 2018 · 6 comments

Comments

@gonutz
Copy link

@gonutz gonutz commented Feb 21, 2018

I tried to add an empty folder to a zip.Writer with zip.Writer.Create. From the docs it is not clear how to do this. There is a google group post that provides the solution, which is to add a slash at the end of the path given to zip.Writer.Create.

I suggest adding this detail to the documentation comment on zip.Writer.Create, e.g. "... To create a folder instead of a file, add a trailing slash to the path.".

@bradfitz bradfitz added this to the Go1.11 milestone Feb 21, 2018
@bradfitz
Copy link
Contributor

@bradfitz bradfitz commented Feb 21, 2018

/cc @dsnet

@bradfitz bradfitz changed the title archive/zip: improve documentation archive/zip: improve Writer.Create documentation on how to add directories Feb 21, 2018
@gopherbot
Copy link

@gopherbot gopherbot commented Feb 25, 2018

Change https://golang.org/cl/97057 mentions this issue: archive/zip: improve Writer.Create documentation on how to add directories

@gonutz gonutz closed this Feb 25, 2018
@dsnet
Copy link
Member

@dsnet dsnet commented Feb 25, 2018

Why did you close this issue?

@gonutz
Copy link
Author

@gonutz gonutz commented Feb 25, 2018

The changeset contains the fix. I do not know how that Gerrit or review tool works, should I re-open the issue and let you guys close it?

@gonutz gonutz reopened this Feb 25, 2018
@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Feb 25, 2018

@gonutz The changelist says "Fixes #24018", so this issue will be automatically closed when the changelist is submitted. Best practice is to wait for that to happen, since the changelist might not be submitted for one reason or another. Thanks.

@gonutz
Copy link
Author

@gonutz gonutz commented Feb 26, 2018

OK I see, thanks for the clarification.

@gopherbot gopherbot closed this in 3b7ad16 Feb 26, 2018
@golang golang locked and limited conversation to collaborators Feb 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.