1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

feat: implement wakatime projects endpoint (resolve #196)

This commit is contained in:
Ferdinand Mütsch
2021-05-01 13:52:03 +02:00
parent 0fbb554fc3
commit cf3d293688
15 changed files with 770 additions and 402 deletions

17
utils/set.go Normal file
View File

@@ -0,0 +1,17 @@
package utils
func StringsToSet(slice []string) map[string]bool {
set := make(map[string]bool, len(slice))
for _, e := range slice {
set[e] = true
}
return set
}
func SetToStrings(set map[string]bool) []string {
slice := make([]string, len(set))
for k := range set {
slice = append(slice, k)
}
return slice
}