mirror of
https://github.com/anchore/syft.git
synced 2025-11-18 00:43:20 +01:00
* refactor source API and syft json source block Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * update source detection and format test utils Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * generate list of all source metadata types Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * extract base and root normalization into helper functions Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * preserve syftjson model package name import ref Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * alias should not be a pointer Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: Alex Goodman <alex.goodman@anchore.com> Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
14 lines
279 B
Go
14 lines
279 B
Go
package source
|
|
|
|
type Alias struct {
|
|
Name string `json:"name" yaml:"name" mapstructure:"name"`
|
|
Version string `json:"version" yaml:"version" mapstructure:"version"`
|
|
}
|
|
|
|
func (a *Alias) IsEmpty() bool {
|
|
if a == nil {
|
|
return true
|
|
}
|
|
return a.Name == "" && a.Version == ""
|
|
}
|