From 556c457355da2c0d0b442d554e85631621c7d3f2 Mon Sep 17 00:00:00 2001 From: Louis Royer Date: Mon, 15 Jun 2026 18:09:03 +0200 Subject: [PATCH] Implement Stringer for jsonapi.ControlURI to improve display in logs --- jsonapi/control_uri.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jsonapi/control_uri.go b/jsonapi/control_uri.go index 8f4a15a..7828394 100644 --- a/jsonapi/control_uri.go +++ b/jsonapi/control_uri.go @@ -28,6 +28,10 @@ func (u ControlURI) MarshalJSON() ([]byte, error) { return json.Marshal(u.String()) } +func (u ControlURI) String() string { + return u.URL.String() +} + func ParseControlURI(text string) (*ControlURI, error) { if len(text) == 0 { return nil, fmt.Errorf("control URI should not be empty")