Skip to content

Commit db9b05f

Browse files
committed
Fixed test as well as definiton of PackageTag
1 parent e115d7a commit db9b05f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

packages.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ func (s PackageLinks) String() string {
7474

7575
// PackageTag holds label information about the package
7676
type PackageTag struct {
77-
ID int `json:"id"`
78-
PackageID int `json:"package_id"`
79-
Name string `json:"name"`
80-
CreatedAt time.Time `json:"created_at"`
81-
UpdatedAt time.Time `json:"updated_at"`
77+
ID int `json:"id"`
78+
PackageID int `json:"package_id"`
79+
Name string `json:"name"`
80+
CreatedAt *time.Time `json:"created_at"`
81+
UpdatedAt *time.Time `json:"updated_at"`
8282
}
8383

8484
func (s PackageTag) String() string {

packages_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func TestPackagesService_ListProjectPackages(t *testing.T) {
2222
"conan_package_name": "Hello",
2323
"version": "0.1",
2424
"package_type": "conan",
25-
"last_downloaded_at": "2023-01-04T20:00:00.000Z"
25+
"last_downloaded_at": "2023-01-04T20:00:00.000Z",
2626
"_links": {
2727
"web_path": "/foo/bar/-/packages/3",
2828
"delete_api_path": "https://gitlab.example.com/api/v4/projects/1/packages/3"
@@ -57,8 +57,8 @@ func TestPackagesService_ListProjectPackages(t *testing.T) {
5757
ID: 1,
5858
PackageID: 37,
5959
Name: "Some Label",
60-
CreatedAt: timestamp,
61-
UpdatedAt: timestamp,
60+
CreatedAt: &timestamp,
61+
UpdatedAt: &timestamp,
6262
}},
6363
}}
6464

0 commit comments

Comments
 (0)