Fix duplicate user struct

This commit is contained in:
ekzyis 2023-04-25 02:26:44 +02:00
parent 12143f1296
commit e0866c8470
1 changed files with 3 additions and 5 deletions

8
sn.go
View File

@ -19,14 +19,15 @@ type GraphQLPayload struct {
Variables map[string]interface{} `json:"variables,omitempty"` Variables map[string]interface{} `json:"variables,omitempty"`
} }
type SnUser struct { type User struct {
Name string `json:"name"` Name string `json:"name"`
} }
type Dupe struct { type Dupe struct {
Id int `json:"id,string"` Id int `json:"id,string"`
Url string `json:"url"` Url string `json:"url"`
Title string `json:"title"` Title string `json:"title"`
User SnUser `json:"user"` User User `json:"user"`
CreatedAt time.Time `json:"createdAt"` CreatedAt time.Time `json:"createdAt"`
Sats int `json:"sats"` Sats int `json:"sats"`
NComments int `json:"ncomments"` 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)) return fmt.Sprintf("%s has %d dupes", e.Url, len(e.Dupes))
} }
type User struct {
Name string `json:"name"`
}
type Comment struct { type Comment struct {
Id int `json:"id,string"` Id int `json:"id,string"`
Text string `json:"text"` Text string `json:"text"`