forked from g8rswimmer/go-twitter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtopic_obj.go
More file actions
28 lines (24 loc) · 679 Bytes
/
topic_obj.go
File metadata and controls
28 lines (24 loc) · 679 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package twitter
// TopicField are the topic field options
type TopicField string
const (
// TopicFieldID is the topic id field
TopicFieldID TopicField = "id"
// TopicFieldName is the topic name field
TopicFieldName TopicField = "name"
// TopicFieldDescription is the topic description field
TopicFieldDescription TopicField = "description"
)
func topicFieldStringArray(arr []TopicField) []string {
strs := make([]string, len(arr))
for i, field := range arr {
strs[i] = string(field)
}
return strs
}
// TopicObj is the topic object
type TopicObj struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
}