From 2f52b8ddf6d83df6d8363aedb24d5c14af28f092 Mon Sep 17 00:00:00 2001 From: mo khan Date: Sat, 18 May 2024 13:41:00 -0600 Subject: refactor: extract file for User struct --- pkg/gitlab/issue.go | 15 --------------- pkg/gitlab/user.go | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 15 deletions(-) create mode 100644 pkg/gitlab/user.go (limited to 'pkg') diff --git a/pkg/gitlab/issue.go b/pkg/gitlab/issue.go index 2c7a9be..30e95ab 100644 --- a/pkg/gitlab/issue.go +++ b/pkg/gitlab/issue.go @@ -13,21 +13,6 @@ const ( IssueStateClosed IssueState = "closed" ) -type UserState string - -const ( - UserStateActive UserState = "active" -) - -type User struct { - ID int `json:"id"` - Username string `json:"username"` - State UserState `json:"state"` - Locked bool `json:"locked"` - AvatarUrl string `json:"avatar_url"` - WebUrl string `json:"web_url"` -} - type Issue struct { ID int `json:"id"` IID int `json:"iid"` diff --git a/pkg/gitlab/user.go b/pkg/gitlab/user.go new file mode 100644 index 0000000..5e5b6e6 --- /dev/null +++ b/pkg/gitlab/user.go @@ -0,0 +1,16 @@ +package gitlab + +type UserState string + +const ( + UserStateActive UserState = "active" +) + +type User struct { + ID int `json:"id"` + Username string `json:"username"` + State UserState `json:"state"` + Locked bool `json:"locked"` + AvatarUrl string `json:"avatar_url"` + WebUrl string `json:"web_url"` +} -- cgit v1.2.3