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

feat: add ui for managing aliases (resolve #91)

This commit is contained in:
Ferdinand Mütsch
2021-01-21 00:26:52 +01:00
parent 16b683fcbd
commit d57c02af7c
20 changed files with 865 additions and 365 deletions

View File

@ -18,6 +18,10 @@ func FormatDateHuman(date time.Time) string {
return date.Format("Mon, 02 Jan 2006 15:04")
}
func Add(i, j int) int {
return i + j
}
func ParseUserAgent(ua string) (string, string, error) {
re := regexp.MustCompile(`(?iU)^wakatime\/[\d+.]+\s\((\w+)-.*\)\s.+\s([^\/\s]+)-wakatime\/.+$`)
groups := re.FindAllStringSubmatch(ua, -1)