oras-go icon indicating copy to clipboard operation
oras-go copied to clipboard

Revisit `file.PackFiles()`

Open Wwwsylvia opened this issue 2 years ago • 1 comments

file.PackFiles() allows users to add files and pack a manifest quickly. But the current design might not be perfect. We should revisit it and think about if we should keep/refactor/deprecate it in oras-go v2.0.0.

https://github.com/oras-project/oras-go/blob/1969551cc3c77b46f09090f00360e8465871fe8f/content/file/file.go#L429-L443

Wwwsylvia avatar Oct 18 '22 12:10 Wwwsylvia

One use case of this function can be found here.

Wwwsylvia avatar Oct 18 '22 12:10 Wwwsylvia

@Wwwsylvia I suggest removing this function, and adding an example instead.

shizhMSFT avatar Dec 19 '22 08:12 shizhMSFT

+1 to an example with just one file add to show how someone can generate a manifest and to keep the lines of code less.

sajayantony avatar Jan 12 '23 02:01 sajayantony