jpictl: fix cloud.yaml unmarshalling #32

Merged
amery merged 2 commits from pr-amery-unmarshaltext into main 2023-10-30 20:43:22 +01:00
Showing only changes of commit 125a4c0dbe - Show all commits
+5
View File
@@ -107,6 +107,11 @@ func (ep EndpointAddress) String() string {
}
}
// UnmarshalText loads an endpoint address from text data
func (ep *EndpointAddress) UnmarshalText(b []byte) error {
return ep.FromString(string(b))
}
// FromString sets the EndpointAddress from a given "[host]:port"
func (ep *EndpointAddress) FromString(s string) error {
host, port, err := core.SplitHostPort(s)