From 1380408b61366e3e04ca706c7bea18a976befc66 Mon Sep 17 00:00:00 2001 From: O3H Date: Thu, 19 Dec 2024 13:46:24 +0000 Subject: [PATCH] remove duplicate PackageCategory --- experimental/package.go | 5 ----- experimental/submission.go | 7 ++++--- tests/exp/submission_test.go | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/experimental/package.go b/experimental/package.go index e3d3d44..66cf0f1 100644 --- a/experimental/package.go +++ b/experimental/package.go @@ -22,11 +22,6 @@ type Package struct { Latest PackageVersion `json:"latest"` } -type PackageCategory struct { - Name string `json:"name"` - Slug string `json:"slug"` -} - type PackageVersion struct { Namespace string `json:"namespace"` Name string `json:"name"` diff --git a/experimental/submission.go b/experimental/submission.go index 63286e6..5a86e15 100644 --- a/experimental/submission.go +++ b/experimental/submission.go @@ -12,6 +12,7 @@ import ( "unicode/utf8" "github.com/hashicorp/go-version" + "github.com/the-egg-corp/thundergo/common" "github.com/the-egg-corp/thundergo/util" ) @@ -38,9 +39,9 @@ type PackageSubmissionMetadata struct { } type AvailableCommunity struct { - Community Community `json:"community"` - Categories []PackageCategory `json:"categories"` - URL string `json:"url"` + Community Community `json:"community"` + Categories []common.PackageCategory `json:"categories"` + URL string `json:"url"` } type PackageSubmissionResult struct { diff --git a/tests/exp/submission_test.go b/tests/exp/submission_test.go index 3ea9756..31c3f68 100644 --- a/tests/exp/submission_test.go +++ b/tests/exp/submission_test.go @@ -13,7 +13,7 @@ const iconPath = "../test-pkg/icon.png.jpg" const manifestPath = "../test-pkg/manifest.json" func TestValidateIcon(t *testing.T) { - //t.Skip() + t.Skip() icon, err := os.ReadFile(iconPath) if err != nil {