@@ -19,7 +19,7 @@ type User struct {
19
19
20
20
// TalkPreviews is a list of TalkPreview objects, containing information about each talk
21
21
// as seen on the user page
22
- TalkPreviews TalkPreviews `json:"talkPreviews"`
22
+ TalkPreviews [] TalkPreview `json:"talkPreviews"`
23
23
}
24
24
25
25
// Author describes the SD profile of the person that's created the presentations
@@ -53,9 +53,6 @@ type TalkPreview struct {
53
53
// Stars describes how many other users have starred this talk
54
54
Stars uint32 `json:"stars"`
55
55
56
- // Date represents the talk presentation date
57
- Date time.Time `json:"date"`
58
-
59
56
// Link describes the link to the talk at Speakerdeck
60
57
Link string `json:"link"`
61
58
@@ -75,6 +72,9 @@ type Talk struct {
75
72
// TalkPreview is embedded here as it contains all the data we want to display here, too
76
73
TalkPreview
77
74
75
+ // Date represents the talk presentation date
76
+ Date time.Time `json:"date"`
77
+
78
78
// Author describes the Speakerdeck profile of the person that's created the presentations
79
79
Author Author `json:"author"`
80
80
@@ -124,24 +124,6 @@ func (p Talks) Swap(i, j int) {
124
124
p [i ], p [j ] = p [j ], p [i ]
125
125
}
126
126
127
- // TalkPreviews orders the TalkPreview objects by time
128
- type TalkPreviews []TalkPreview
129
-
130
- // Len implements sort.Interface
131
- func (p TalkPreviews ) Len () int {
132
- return len (p )
133
- }
134
-
135
- // Less implements sort.Interface
136
- func (p TalkPreviews ) Less (i , j int ) bool {
137
- return p [i ].Date .Before (p [j ].Date )
138
- }
139
-
140
- // Swap implements sort.Interface
141
- func (p TalkPreviews ) Swap (i , j int ) {
142
- p [i ], p [j ] = p [j ], p [i ]
143
- }
144
-
145
127
// Location describes a geographical location for the talk
146
128
// This struct is populated by the LocationExtension, and is set based on
147
129
// a "Location: <address>" string in the talk description. For instance,
0 commit comments