x/net/websocket: Naming of TLSConfig #16447
Milestone
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.idI 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? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Serverclass ofnet/httpConfiguses the nameTLSConfigfor itstls.configvariable whereasConfigclass ofx/net/websocketusesTlsConfig. 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: