Renamed constants to match Go style guidelines.

This commit is contained in:
Joachim Bauch 2014-04-17 23:46:48 +02:00
parent 56543ef6d6
commit f99474eb97
1 changed files with 4 additions and 4 deletions

View File

@ -21,8 +21,8 @@ type HandshakeError struct {
func (e HandshakeError) Error() string { return e.message }
const (
DEFAULT_READ_BUFFER_SIZE = 4096
DEFAULT_WRITE_BUFFER_SIZE = 4096
defaultReadBufferSize = 4096
defaultWriteBufferSize = 4096
)
type Upgrader struct {
@ -136,11 +136,11 @@ func (u *Upgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeade
readBufSize := u.ReadBufferSize
if readBufSize == 0 {
readBufSize = DEFAULT_READ_BUFFER_SIZE
readBufSize = defaultReadBufferSize
}
writeBufSize := u.WriteBufferSize
if writeBufSize == 0 {
writeBufSize = DEFAULT_WRITE_BUFFER_SIZE
writeBufSize = defaultWriteBufferSize
}
c := newConn(netConn, true, readBufSize, writeBufSize)