-
-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathlist_fields.go
More file actions
35 lines (27 loc) · 676 Bytes
/
Copy pathlist_fields.go
File metadata and controls
35 lines (27 loc) · 676 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
29
30
31
32
33
34
35
package fields
type ListField string
const (
ListFieldCreatedAt ListField = "created_at"
ListFieldFollowerCount ListField = "follower_count"
ListFieldMemberCount ListField = "member_count"
ListFieldPrivate ListField = "private"
ListFieldDescription ListField = "description"
ListFieldOwnerID ListField = "owner_id"
)
func (f ListField) String() string {
return string(f)
}
type ListFieldList []ListField
func (fl ListFieldList) FieldsName() string {
return "list.fields"
}
func (fl ListFieldList) Values() []string {
if fl == nil {
return []string{}
}
s := []string{}
for _, f := range fl {
s = append(s, f.String())
}
return s
}