diff --git a/README.md b/README.md index 9d15f2e..a15c565 100644 --- a/README.md +++ b/README.md @@ -251,8 +251,8 @@ The `oops.OopsError` builder must finish with either `.Errorf(...)`, `.Wrap(...) | `.Span(string)` | `err.Span() string` | Add a span representing a unit of work or operation... (default: ULID) | | `.Hint(string)` | `err.Hint() string` | Set a hint for faster debugging | | `.Owner(string)` | `err.Owner() (string)` | Set the name/email of the collegue/team responsible for handling this error. Useful for alerting purpose | -| `.User(string, any...)` | `err.User() (string, map[string]any)` | Supply user id and a chain of key/value | -| `.Tenant(string, any...)` | `err.Tenant() (string, map[string]any)` | Supply tenant id and a chain of key/value | +| `.User(string, any...)` | `err.User() (string, any...)` | Supply user id and a chain of key/value | +| `.Tenant(string, any...)` | `err.Tenant() (string, any...)` | Supply tenant id and a chain of key/value | | `.Request(*http.Request, bool)` | `err.Request() *http.Request` | Supply http request | | `.Response(*http.Response, bool)` | `err.Response() *http.Response` | Supply http response | diff --git a/oops.go b/oops.go index d65e4e6..de5967c 100644 --- a/oops.go +++ b/oops.go @@ -128,12 +128,12 @@ func Owner(owner string) OopsErrorBuilder { } // User supplies user id and a chain of key/value. -func User(userID string, data map[string]any) OopsErrorBuilder { +func User(userID string, data ...any) OopsErrorBuilder { return new().User(userID, data) } // Tenant supplies tenant id and a chain of key/value. -func Tenant(tenantID string, data map[string]any) OopsErrorBuilder { +func Tenant(tenantID string, data ...any) OopsErrorBuilder { return new().Tenant(tenantID, data) }