simpleauth/pkg/acl/url.go

18 lines
245 B
Go
Raw Normal View History

2023-02-20 17:38:51 -07:00
package acl
import "net/url"
type URL struct {
*url.URL
}
func (u *URL) UnmarshalYAML(unmarshal func(any) error) error {
var s string
if err := unmarshal(&s); err != nil {
return err
}
nu, err := url.Parse(s)
u.URL = nu
return err
}