-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/net/websocket: Naming of TLSConfig #16447
Comments
We should fix X/net/websocket if possible. The general Go style specified
TLSConfig.
|
@campoy, can you query BigQuery and see how much code would break if we fixed the naming? |
I found 685 repos that could be broken by this change SELECT COUNT(DISTINCT repo_name)
FROM
(
SELECT id, content
FROM [campoy-github:go_files.contents]
WHERE content CONTAINS '"golang.org/x/net/websocket"'
AND content CONTAINS 'TlsConfig'
AND NOT content CONTAINS 'Copyright 2009 The Go Authors'
) as content JOIN
(
SELECT id, repo_name, path
FROM [campoy-github:go_files.files]
WHERE NOT path CONTAINS 'golang.org/x/net/websocket'
) as files
ON content.id = files.id I can provide with a list of the files that actually use the field by its name if you want, but I checked a couple of them and they would indeed break. Example from this file: port := 80
if protocol == "wss" {
port = 443
}
wsConfig.Location.Host = fmt.Sprintf("%s:%d", hostName, port)
wsConfig.TlsConfig = tlsConfig
ws, err := websocket.DialConfig(wsConfig)
if err != nil {
return "", err
} |
What about internal references? |
I'm dropping all files in both the package and any vendored copy of it. |
Requesting an update on this. Will this change be committed regardless of the compatibility issues? |
Server
class ofnet/httpConfig
uses the nameTLSConfig
for itstls.config
variable whereasConfig
class ofx/net/websocket
usesTlsConfig
. Can the inconsistent naming be resolved, or will it be kept due to backwards compatibility?The text was updated successfully, but these errors were encountered: