21 lines
316 B
Go
21 lines
316 B
Go
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
|
|
}
|