if I have
// types.go
type S string
func (s *S) Lower() *S {
*s = S(strings.ToLower(string(*s)))
return s
}
`
// in another file
import "u/types"
func main() {
s := types.S("asdf")
if s == "asdf" {
s.Lower()
}
}
Is there a way to shorten types.S("asdf") to just S("asdf")?
Is there a way to lowercase method calls from other files? e.g. s.Lower() => s.lower()?