dip/vendor/github.com/gobuffalo/here/path.go

21 lines
233 B
Go
Raw Normal View History

2020-01-27 21:16:08 +01:00
package here
import (
"fmt"
)
type Path struct {
Pkg string
Name string
}
func (p Path) String() string {
if p.Name == "" {
p.Name = "/"
}
if p.Pkg == "" {
return p.Name
}
return fmt.Sprintf("%s:%s", p.Pkg, p.Name)
}