feat: Add template func hasField (#1754)

Signed-off-by: Lehman, Alex <alex.lehman@gtri.gatech.edu>
This commit is contained in:
Alex Lehman
2023-04-21 09:34:06 -04:00
committed by GitHub
parent a42bac6fcc
commit b2b332e8b2
6 changed files with 111 additions and 0 deletions
+2
View File
@@ -261,6 +261,8 @@ Which would produce output like:
Syft also includes a vast array of utility templating functions from [sprig](http://masterminds.github.io/sprig/) apart from the default Golang [text/template](https://pkg.go.dev/text/template#hdr-Functions) to allow users to customize the output format.
Lastly, Syft has custom templating functions defined in `./syft/format/template/encoder.go` to help parse the passed-in JSON structs.
## Multiple outputs
Syft can also output _multiple_ files in differing formats by appending