This commit is contained in:
shoopea
2021-10-16 21:39:54 +08:00
parent 6c3cd690de
commit 9eb8cee7d8
5 changed files with 980 additions and 541 deletions

20
location.go Normal file
View File

@@ -0,0 +1,20 @@
package main
import "strings"
type Location string
func (l Location) Box() string {
s := strings.Split(string(l), `:`)
return s[0]
}
func (l Location) Path() string {
s := strings.Split(string(l), `:`)
return s[1]
}
func (l Location) Valid() bool {
s := strings.Split(string(l), `:`)
return len(s) == 2
}