From e0866c84703accba01405b7c63a1a715b1089dba Mon Sep 17 00:00:00 2001 From: ekzyis Date: Tue, 25 Apr 2023 02:26:44 +0200 Subject: [PATCH] Fix duplicate user struct --- sn.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sn.go b/sn.go index b49a2e2..d360a3a 100644 --- a/sn.go +++ b/sn.go @@ -19,14 +19,15 @@ type GraphQLPayload struct { Variables map[string]interface{} `json:"variables,omitempty"` } -type SnUser struct { +type User struct { Name string `json:"name"` } + type Dupe struct { Id int `json:"id,string"` Url string `json:"url"` Title string `json:"title"` - User SnUser `json:"user"` + User User `json:"user"` CreatedAt time.Time `json:"createdAt"` Sats int `json:"sats"` NComments int `json:"ncomments"` @@ -47,9 +48,6 @@ func (e *DupesError) Error() string { return fmt.Sprintf("%s has %d dupes", e.Url, len(e.Dupes)) } -type User struct { - Name string `json:"name"` -} type Comment struct { Id int `json:"id,string"` Text string `json:"text"`