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
All (or most) constructors functions are prefixed with New, #60665 added a function called OIDFromInts. I think that we should prefix it with New, as we do in other parts of the std.
When I want to construct some type I often look what LSP finds for New*, it might be slightly confusing that it is not prefixed with New. It was added just recently so we are still free to change the name at this point.
Generally new “New” prefix on a Go function name implies a function that returns a pointer.
x509.OIDFromInts (as currently drafted) returns a struct value instead ((OID, error)), and it appears that OID is intended to function as a value type.
rsc
changed the title
proposal: crypto/x509: rename OIDFromInts to NewOIDFromInts
proposal: crypto/x509: rename OIDFromInts to NewOIDFromInts
Dec 14, 2023
All (or most) constructors functions are prefixed with New, #60665 added a function called
OIDFromInts
. I think that we should prefix it with New, as we do in other parts of the std.When I want to construct some type I often look what LSP finds for New*, it might be slightly confusing that it is not prefixed with New. It was added just recently so we are still free to change the name at this point.
CC @rolandshoemaker
The text was updated successfully, but these errors were encountered: