format using go-1.19

This commit is contained in:
trinity-1686a 2022-10-09 16:36:22 +02:00
parent 9ce1de4eee
commit 5ef5142bb0
11 changed files with 34 additions and 27 deletions

View file

@ -17,7 +17,6 @@ Transport as follows:
transport := snowflake_server.NewSnowflakeServer(certManager.GetCertificate)
The Listen function starts a new listener, and Accept will return incoming Snowflake connections:
ln, err := transport.Listen(addr)
@ -31,8 +30,6 @@ The Listen function starts a new listener, and Accept will return incoming Snowf
}
// handle conn
}
*/
package snowflake_server

View file

@ -42,7 +42,7 @@ additional HTTP listener on port 80 to work with ACME.
flag.PrintDefaults()
}
//proxy copies data bidirectionally from one connection to another.
// proxy copies data bidirectionally from one connection to another.
func proxy(local *net.TCPConn, conn net.Conn) {
var wg sync.WaitGroup
wg.Add(2)
@ -67,7 +67,7 @@ func proxy(local *net.TCPConn, conn net.Conn) {
wg.Wait()
}
//handleConn bidirectionally connects a client snowflake connection with an ORPort.
// handleConn bidirectionally connects a client snowflake connection with an ORPort.
func handleConn(conn net.Conn) error {
addr := conn.RemoteAddr().String()
statsChannel <- addr != ""
@ -80,7 +80,7 @@ func handleConn(conn net.Conn) error {
return nil
}
//acceptLoop accepts incoming client snowflake connection and passes them to a handler function.
// acceptLoop accepts incoming client snowflake connection and passes them to a handler function.
func acceptLoop(ln net.Listener) {
for {
conn, err := ln.Accept()