From 8dedc03292cfe4b2b100364ba3950d985269e919 Mon Sep 17 00:00:00 2001 From: Alex Goodman Date: Tue, 13 Oct 2020 14:42:42 -0400 Subject: [PATCH] allow for gemspec metadata fields to be optional Signed-off-by: Alex Goodman --- syft/pkg/gem_metadata.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/syft/pkg/gem_metadata.go b/syft/pkg/gem_metadata.go index e93bbc17154..c06a244b2c7 100644 --- a/syft/pkg/gem_metadata.go +++ b/syft/pkg/gem_metadata.go @@ -3,8 +3,8 @@ package pkg type GemMetadata struct { Name string `mapstructure:"name" json:"name"` Version string `mapstructure:"version" json:"version"` - Files []string `mapstructure:"files" json:"files"` - Authors []string `mapstructure:"authors" json:"authors"` - Licenses []string `mapstructure:"licenses" json:"licenses"` - Homepage string `mapstructure:"homepage" json:"homepage"` + Files []string `mapstructure:"files" json:"files,omitempty"` + Authors []string `mapstructure:"authors" json:"authors,omitempty"` + Licenses []string `mapstructure:"licenses" json:"licenses,omitempty"` + Homepage string `mapstructure:"homepage" json:"homepage,omitempty"` }