You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Go 1.27 allows methods to declare their own type parameters. Turn the
package-level generic functions that took a receiver as first argument
into methods:
- http.Do[T](r, ...) becomes Request.Do[T](...)
- http.OauthResult[T](o, ...) becomes OAuthRequest.Result[T](...)
- cache.Get/Set/Delete/DeleteAll/Refresh/Print(store, ...) become
methods on Store, e.g. cache.Device.Get[string](key)
cache.Store already carried non-generic methods; Get and Set were only
package functions because generic methods did not exist. OneOf (options)
and the interface-based helpers stay functions, as interface methods
cannot have type parameters.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F4pmtq5zxSxC4VqXipPAmY
0 commit comments