bashbrew/pkg
Tianon Gravi 60ee93caf8 Simplify `pkg/dockerfile` interface by ditching pointer
This means slightly more typing in "zero-value" cases (`nil` vs `dockerfile.Metadata{}`), but the tradeoff is that it's simpler to use and reason about (and all the struct members are pointer-type map/slice values anyhow, so copying the struct is still pretty cheap).

This also swaps the scanner error handling to return the partially parsed Metadata object alongside the scanner error -- the error already tells us the object isn't fully complete data, so it's fair/fine to return and will likely just be ignored by the caller instead.  This also allows us to get to 100% code coverage. 👀

This also updates our "treat `oci-import` just like `FROM scratch`" code to *actually* parse `FROM scratch` so we can't accidentally cause "missing data" bugs there in the future, and I implemented that using `sync.OnceValues` which requires upgrading to Go 1.21, but IMO that's a worthwhile tradeoff (because `sync.OnceValues` makes that code so clean/simple).
2025-01-09 16:20:49 -08:00
..
dockerfile Simplify `pkg/dockerfile` interface by ditching pointer 2025-01-09 16:20:49 -08:00
execpipe Merge github.com/docker-library/go-dockerlibrary into bashbrew 2020-08-19 16:21:07 -07:00
gitfs Fix gitfs symlink handling 2024-02-22 15:47:41 -08:00
stripper Merge github.com/docker-library/go-dockerlibrary into bashbrew 2020-08-19 16:21:07 -07:00
tarscrub Add `ArchGitChecksum` template command in `bashbrew cat` 2024-01-12 13:13:42 -08:00
templatelib Add test for sha256sum function 2024-01-22 09:46:30 -08:00