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

Signed-off-by: Christopher Phillips <32073428+spiffcs@users.noreply.github.com>
This commit is contained in:
Christopher Angelo Phillips 2025-02-03 10:43:06 -05:00 committed by GitHub
parent 4dc86a06c7
commit 5e2ba43328
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 19 deletions

View File

@ -36,9 +36,9 @@ type packageJSON struct {
} }
type author struct { type author struct {
Name string `json:"name" mapstruct:"name"` Name string `json:"name" mapstructure:"name"`
Email string `json:"email" mapstruct:"email"` Email string `json:"email" mapstructure:"email"`
URL string `json:"url" mapstruct:"url"` URL string `json:"url" mapstructure:"url"`
} }
type repository struct { type repository struct {

View File

@ -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 // 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. // 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 { type PythonPackage struct {
Name string `json:"name" mapstruct:"Name"` Name string `json:"name" mapstructure:"Name"`
Version string `json:"version" mapstruct:"Version"` Version string `json:"version" mapstructure:"Version"`
Author string `json:"author" mapstruct:"Author"` Author string `json:"author" mapstructure:"Author"`
AuthorEmail string `json:"authorEmail" mapstruct:"Authoremail"` AuthorEmail string `json:"authorEmail" mapstructure:"AuthorEmail"`
Platform string `json:"platform" mapstruct:"Platform"` Platform string `json:"platform" mapstructure:"Platform"`
Files []PythonFileRecord `json:"files,omitempty"` Files []PythonFileRecord `json:"files,omitempty"`
SitePackagesRootPath string `json:"sitePackagesRootPath"` SitePackagesRootPath string `json:"sitePackagesRootPath"`
TopLevelPackages []string `json:"topLevelPackages,omitempty"` TopLevelPackages []string `json:"topLevelPackages,omitempty"`
DirectURLOrigin *PythonDirectURLOriginInfo `json:"directUrlOrigin,omitempty"` DirectURLOrigin *PythonDirectURLOriginInfo `json:"directUrlOrigin,omitempty"`
RequiresPython string `json:"requiresPython,omitempty" mapstruct:"RequiresPython"` RequiresPython string `json:"requiresPython,omitempty" mapstructure:"RequiresPython"`
RequiresDist []string `json:"requiresDist,omitempty" mapstruct:"RequiresDist"` RequiresDist []string `json:"requiresDist,omitempty" mapstructure:"RequiresDist"`
ProvidesExtra []string `json:"providesExtra,omitempty" mapstruct:"ProvidesExtra"` ProvidesExtra []string `json:"providesExtra,omitempty" mapstructure:"ProvidesExtra"`
} }
// PythonFileDigest represents the file metadata for a single file attributed to a python package. // PythonFileDigest represents the file metadata for a single file attributed to a python package.
@ -86,9 +86,9 @@ type PythonPoetryLockExtraEntry struct {
// PythonRequirementsEntry represents a single entry within a [*-]requirements.txt file. // PythonRequirementsEntry represents a single entry within a [*-]requirements.txt file.
type PythonRequirementsEntry struct { type PythonRequirementsEntry struct {
Name string `json:"name" mapstruct:"Name"` Name string `json:"name" mapstructure:"Name"`
Extras []string `json:"extras,omitempty" mapstruct:"Extras"` Extras []string `json:"extras,omitempty" mapstructure:"Extras"`
VersionConstraint string `json:"versionConstraint" mapstruct:"VersionConstraint"` VersionConstraint string `json:"versionConstraint" mapstructure:"VersionConstraint"`
URL string `json:"url,omitempty" mapstruct:"URL"` URL string `json:"url,omitempty" mapstructure:"URL"`
Markers string `json:"markers,omitempty" mapstruct:"Markers"` Markers string `json:"markers,omitempty" mapstructure:"Markers"`
} }

View File

@ -3,10 +3,10 @@ package pkg
type SwiplPackEntry struct { type SwiplPackEntry struct {
Name string `toml:"name" json:"name"` Name string `toml:"name" json:"name"`
Version string `toml:"version" json:"version"` Version string `toml:"version" json:"version"`
Author string `json:"author" mapstruct:"Author"` Author string `json:"author" mapstructure:"Author"`
AuthorEmail string `json:"authorEmail" mapstruct:"Authoremail"` AuthorEmail string `json:"authorEmail" mapstructure:"AuthorEmail"`
Packager string `json:"packager" mapstructure:"Packager"` Packager string `json:"packager" mapstructure:"Packager"`
PackagerEmail string `json:"packagerEmail" mapstruct:"Packageremail"` PackagerEmail string `json:"packagerEmail" mapstructure:"PackagerEmail"`
Homepage string `json:"homepage"` Homepage string `json:"homepage"`
Dependencies []string `toml:"dependencies" json:"dependencies"` Dependencies []string `toml:"dependencies" json:"dependencies"`
} }