Skip to content

Commit b4efc0e

Browse files
committed
fix: i forgor to run lint again after changing the struct names. unchanged the names
1 parent 4130feb commit b4efc0e

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

routers/api/packages/generic/generic.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,25 @@ var (
2323
filenameRegex = regexp.MustCompile(`\A[-_+=:;.()\[\]{}~!@#$%^& \w]+\z`)
2424
)
2525

26-
// GenericPackageFileInfo represents information about an existing package file
26+
// PackageFileInfo represents information about an existing package file
2727
// swagger:model
28-
type GenericPackageFileInfo struct {
28+
type PackageFileInfo struct {
2929
// Name of package file
3030
Name string `json:"name"`
3131
// swagger:strfmt date-time
3232
// Date when package file was created/uploaded
3333
CreatedUnix timeutil.TimeStamp `json:"created"`
3434
}
3535

36-
// GenericPackageInfo represents information about an existing package file
36+
// PackageInfo represents information about an existing package file
3737
// swagger:model
38-
type GenericPackageInfo struct {
38+
type PackageInfo struct {
3939
/// Version linked to package information
4040
Version string `json:"version"`
4141
/// Download count for files within version
4242
DownloadCount int64 `json:"downloads"`
4343
/// Files uploaded for package version
44-
Files []GenericPackageFileInfo `json:"files"`
44+
Files []PackageFileInfo `json:"files"`
4545
}
4646

4747
func apiError(ctx *context.Context, status int, obj any) {
@@ -61,23 +61,23 @@ func EnumeratePackageVersions(ctx *context.Context) {
6161
return
6262
}
6363

64-
var info []GenericPackageInfo
64+
var info []PackageInfo
6565
for _, pv := range pvs {
6666
packageFiles, err := packages_model.GetFilesByVersionID(ctx, pv.ID)
6767
if err != nil {
6868
apiError(ctx, http.StatusInternalServerError, err)
6969
return
7070
}
7171

72-
var files []GenericPackageFileInfo
72+
var files []PackageFileInfo
7373
for _, file := range packageFiles {
74-
files = append(files, GenericPackageFileInfo{
74+
files = append(files, PackageFileInfo{
7575
Name: file.Name,
7676
CreatedUnix: file.CreatedUnix,
7777
})
7878
}
7979

80-
info = append(info, GenericPackageInfo{
80+
info = append(info, PackageInfo{
8181
Version: pv.Version,
8282
DownloadCount: pv.DownloadCount,
8383
Files: files,

0 commit comments

Comments
 (0)