Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: replace all shorthand tags of mapstruct -> mapstructure #3633

Merged
merged 2 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions syft/pkg/cataloger/javascript/parse_package_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ type packageJSON struct {
}

type author struct {
Name string `json:"name" mapstruct:"name"`
Email string `json:"email" mapstruct:"email"`
URL string `json:"url" mapstruct:"url"`
Name string `json:"name" mapstructure:"name"`
Email string `json:"email" mapstructure:"email"`
URL string `json:"url" mapstructure:"url"`
}

type repository struct {
Expand Down
26 changes: 13 additions & 13 deletions syft/pkg/python.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ var _ FileOwner = (*PythonPackage)(nil)
// Historically these were defined in PEPs 345, 314, and 241, but have been superseded by PEP 566. This means that this
// struct can (partially) express at least versions 1.0, 1.1, 1.2, 2.1, 2.2, and 2.3 of the metadata format.
type PythonPackage struct {
Name string `json:"name" mapstruct:"Name"`
Version string `json:"version" mapstruct:"Version"`
Author string `json:"author" mapstruct:"Author"`
AuthorEmail string `json:"authorEmail" mapstruct:"Authoremail"`
Platform string `json:"platform" mapstruct:"Platform"`
Name string `json:"name" mapstructure:"Name"`
Version string `json:"version" mapstructure:"Version"`
Author string `json:"author" mapstructure:"Author"`
AuthorEmail string `json:"authorEmail" mapstructure:"AuthorEmail"`
Platform string `json:"platform" mapstructure:"Platform"`
Files []PythonFileRecord `json:"files,omitempty"`
SitePackagesRootPath string `json:"sitePackagesRootPath"`
TopLevelPackages []string `json:"topLevelPackages,omitempty"`
DirectURLOrigin *PythonDirectURLOriginInfo `json:"directUrlOrigin,omitempty"`
RequiresPython string `json:"requiresPython,omitempty" mapstruct:"RequiresPython"`
RequiresDist []string `json:"requiresDist,omitempty" mapstruct:"RequiresDist"`
ProvidesExtra []string `json:"providesExtra,omitempty" mapstruct:"ProvidesExtra"`
RequiresPython string `json:"requiresPython,omitempty" mapstructure:"RequiresPython"`
RequiresDist []string `json:"requiresDist,omitempty" mapstructure:"RequiresDist"`
ProvidesExtra []string `json:"providesExtra,omitempty" mapstructure:"ProvidesExtra"`
}

// PythonFileDigest represents the file metadata for a single file attributed to a python package.
Expand Down Expand Up @@ -86,9 +86,9 @@ type PythonPoetryLockExtraEntry struct {

// PythonRequirementsEntry represents a single entry within a [*-]requirements.txt file.
type PythonRequirementsEntry struct {
Name string `json:"name" mapstruct:"Name"`
Extras []string `json:"extras,omitempty" mapstruct:"Extras"`
VersionConstraint string `json:"versionConstraint" mapstruct:"VersionConstraint"`
URL string `json:"url,omitempty" mapstruct:"URL"`
Markers string `json:"markers,omitempty" mapstruct:"Markers"`
Name string `json:"name" mapstructure:"Name"`
Extras []string `json:"extras,omitempty" mapstructure:"Extras"`
VersionConstraint string `json:"versionConstraint" mapstructure:"VersionConstraint"`
URL string `json:"url,omitempty" mapstructure:"URL"`
Markers string `json:"markers,omitempty" mapstructure:"Markers"`
}
6 changes: 3 additions & 3 deletions syft/pkg/swipl.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package pkg
type SwiplPackEntry struct {
Name string `toml:"name" json:"name"`
Version string `toml:"version" json:"version"`
Author string `json:"author" mapstruct:"Author"`
AuthorEmail string `json:"authorEmail" mapstruct:"Authoremail"`
Author string `json:"author" mapstructure:"Author"`
AuthorEmail string `json:"authorEmail" mapstructure:"AuthorEmail"`
Packager string `json:"packager" mapstructure:"Packager"`
PackagerEmail string `json:"packagerEmail" mapstruct:"Packageremail"`
PackagerEmail string `json:"packagerEmail" mapstructure:"PackagerEmail"`
Homepage string `json:"homepage"`
Dependencies []string `toml:"dependencies" json:"dependencies"`
}
Loading