move all internal packages to "internal/"
I wasn't aware this pattern actually had a compiler blessing, but it turns out that internal packages have unique visibility behaviour which can be used to have internal packages which cannot be imported outside of the project (more specifically, it cannot be imported by a package which is not a descendant of the parent directory of the internal package). This will allow us to remove lots of things from umoci's public API.
Ok, but... I'm using mutate/ and oci/ :)
oci wouldn't be moved to internal. Most of pkg would likely be moved, as well as third_party (though honestly, third_party should be removed entirely).
Regarding mutate, I do really want to spend some time rethinking the API because I've never been really happy with it -- not to mention that we need to add support to mutate for modifying the annotations of descriptors all the way up the DescriptorPath. If you have any suggestions with how I could improve the API for mutate, I'm more than happy to hear them. But long-term, mutate will be part of the stable API of umoci, because it's kind of necessary to implement it properly.
oci wouldn't be moved to internal
ok, so is the "oci/**" tag incorrect then?
If you have any suggestions with how I could improve the API for mutate, I'm more than happy to hear them.
The API is mostly fine except that it assumes you want everything gzipped, so I've had to implement some other descriptor modifying stuff when I didn't want stuff gzipped (squashfs). If we drop that, I could get rid of some code :)
ok, so is the "oci/**" tag incorrect then?
Yup, we didn't have a go-api tag -- I've added one now.
The API is mostly fine except that it assumes you want everything gzipped, so I've had to implement some other descriptor modifying stuff when I didn't want stuff gzipped (squashfs). If we drop that, I could get rid of some code :)
We can definitely fix that, though there are some bits that I think should be at least cleaned up a little bit (plus the DescriptorPath modification changes, so that we can expose that through the CLI).