archive/zip: improve Writer.Create documentation on how to add directories #24018
Labels
Documentation
FrozenDueToAge
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
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.".
The text was updated successfully, but these errors were encountered: