some stringifiers.

This commit is contained in:
fiatjaf
2022-11-26 09:25:31 -03:00
parent b0ae497656
commit 67d8f26d8a
2 changed files with 15 additions and 0 deletions

View File

@@ -51,6 +51,10 @@ func RelayConnect(url string) (*Relay, error) {
return r, err
}
func (r *Relay) String() string {
return r.URL
}
func (r *Relay) Connect() error {
if r.URL == "" {
return fmt.Errorf("invalid relay URL '%s'", r.URL)