зеркало из https://github.com/golang/net.git
all: correct typos in comments
Change-Id: Idc75240e5546be2f2b091878910339b4967c93c7
GitHub-Last-Rev: c78560c06f
GitHub-Pull-Request: golang/net#166
Reviewed-on: https://go-review.googlesource.com/c/net/+/465715
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
Родитель
296f09aa38
Коммит
7e3c19ca52
|
@ -1704,7 +1704,7 @@ func TestServer_Rejects_HeadersSelfDependence(t *testing.T) {
|
|||
})
|
||||
}
|
||||
|
||||
// No PRIORTY frame with a self-dependence.
|
||||
// No PRIORITY frame with a self-dependence.
|
||||
func TestServer_Rejects_PrioritySelfDependence(t *testing.T) {
|
||||
testServerRejectsStream(t, ErrCodeProtocol, func(st *serverTester) {
|
||||
st.fr.AllowIllegalWrites = true
|
||||
|
|
|
@ -33,7 +33,7 @@ func multipartMessageBodyDataLen(proto int, withOrigDgram bool, b []byte, exts [
|
|||
}
|
||||
|
||||
// multipartMessageOrigDatagramLen takes b as an original datagram,
|
||||
// and returns a required length for a padded orignal datagram in wire
|
||||
// and returns a required length for a padded original datagram in wire
|
||||
// format.
|
||||
func multipartMessageOrigDatagramLen(proto int, b []byte) int {
|
||||
roundup := func(b []byte, align int) int {
|
||||
|
|
|
@ -46,7 +46,7 @@ func MarshalAuthReply(ver int, m socks.AuthMethod) ([]byte, error) {
|
|||
return []byte{byte(ver), byte(m)}, nil
|
||||
}
|
||||
|
||||
// A CmdRequest repesents a command request.
|
||||
// A CmdRequest represents a command request.
|
||||
type CmdRequest struct {
|
||||
Version int
|
||||
Cmd socks.Command
|
||||
|
@ -120,12 +120,12 @@ func MarshalCmdReply(ver int, reply socks.Reply, a *socks.Addr) ([]byte, error)
|
|||
return b, nil
|
||||
}
|
||||
|
||||
// A Server repesents a server for handshake testing.
|
||||
// A Server represents a server for handshake testing.
|
||||
type Server struct {
|
||||
ln net.Listener
|
||||
}
|
||||
|
||||
// Addr rerurns a server address.
|
||||
// Addr returns a server address.
|
||||
func (s *Server) Addr() net.Addr {
|
||||
return s.ln.Addr()
|
||||
}
|
||||
|
|
|
@ -142,7 +142,7 @@ func TestUDPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) {
|
|||
}
|
||||
c, err := net.ListenPacket("udp4", net.JoinHostPort(ip.String(), port)) // unicast address with non-reusable port
|
||||
if err != nil {
|
||||
// The listen may fail when the serivce is
|
||||
// The listen may fail when the service is
|
||||
// already in use, but it's fine because the
|
||||
// purpose of this is not to test the
|
||||
// bookkeeping of IP control block inside the
|
||||
|
|
|
@ -245,7 +245,7 @@ func (c *dgramOpt) Checksum() (on bool, offset int, err error) {
|
|||
return true, offset, nil
|
||||
}
|
||||
|
||||
// SetChecksum enables the kernel checksum processing. If on is ture,
|
||||
// SetChecksum enables the kernel checksum processing. If on is true,
|
||||
// the offset should be an offset in bytes into the data of where the
|
||||
// checksum field is located.
|
||||
func (c *dgramOpt) SetChecksum(on bool, offset int) error {
|
||||
|
|
|
@ -142,7 +142,7 @@ func TestUDPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) {
|
|||
}
|
||||
c, err := net.ListenPacket("udp6", net.JoinHostPort(ip.String()+"%"+ifi.Name, port)) // unicast address with non-reusable port
|
||||
if err != nil {
|
||||
// The listen may fail when the serivce is
|
||||
// The listen may fail when the service is
|
||||
// already in use, but it's fine because the
|
||||
// purpose of this is not to test the
|
||||
// bookkeeping of IP control block inside the
|
||||
|
|
|
@ -29,7 +29,7 @@ type limitListener struct {
|
|||
}
|
||||
|
||||
// acquire acquires the limiting semaphore. Returns true if successfully
|
||||
// accquired, false if the listener is closed and the semaphore is not
|
||||
// acquired, false if the listener is closed and the semaphore is not
|
||||
// acquired.
|
||||
func (l *limitListener) acquire() bool {
|
||||
select {
|
||||
|
|
|
@ -655,7 +655,7 @@ func handlePropfindError(err error, info os.FileInfo) error {
|
|||
// We need to be careful with other errors: there is no way to abort the xml stream
|
||||
// part way through while returning a valid PROPFIND response. Returning only half
|
||||
// the data would be misleading, but so would be returning results tainted by errors.
|
||||
// The curent behaviour by returning an error here leads to the stream being aborted,
|
||||
// The current behaviour by returning an error here leads to the stream being aborted,
|
||||
// and the parent http server complaining about writing a spurious header. We should
|
||||
// consider further enhancing this error handling to more gracefully fail, or perhaps
|
||||
// buffer the entire response until we've walked the tree.
|
||||
|
|
|
@ -369,7 +369,7 @@ func generateNonce() (nonce []byte) {
|
|||
return
|
||||
}
|
||||
|
||||
// removeZone removes IPv6 zone identifer from host.
|
||||
// removeZone removes IPv6 zone identifier from host.
|
||||
// E.g., "[fe80::1%en0]:8080" to "[fe80::1]:8080"
|
||||
func removeZone(host string) string {
|
||||
if !strings.HasPrefix(host, "[") {
|
||||
|
|
Загрузка…
Ссылка в новой задаче