func (u *URL) UnmarshalText(data []byte) error {
	url, err := ParseURL(string(data))
	if err != nil {
		return err
	}
	*u = *url
	return nil
}
// UnmarshalText implements encoding.TestUnmarshaler by
// parsing the data with ParseURL.
UnmarshalText implements encoding.TestUnmarshaler by
parsing the data with ParseURL.
// UnmarshalText implements encoding . TestUnmarshaler by // parsing the data with ParseURL .
func (u *URL) UnmarshalText(data []byte) error {
	url, err := ParseURL(string(data))
	if err != nil {
		return err
	}
	*u = *url
	return nil
}
func ( u * URL ) UnmarshalText ( data [ ] byte ) error { url , err := ParseURL ( string ( data ) ) if err != nil { return err } * u = * url return nil }
UnmarshalText implements encoding.TestUnmarshaler by
parsing the data with ParseURL.
UnmarshalText implements encoding . TestUnmarshaler by parsing the data with ParseURL .