Skip to content

Commit

Permalink
Merge pull request valyala#303 from chebyrash/master
Browse files Browse the repository at this point in the history
Typo fixes
  • Loading branch information
kirillDanshin authored Aug 13, 2018
2 parents 8c70077 + f24d00f commit 4a16377
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion args.go
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ func decodeArgAppend(dst, src []byte) []byte {
// decodeArgAppendNoPlus is almost identical to decodeArgAppend, but it doesn't
// substitute '+' with ' '.
//
// The function is copy-pasted from decodeArgAppend due to the preformance
// The function is copy-pasted from decodeArgAppend due to the performance
// reasons only.
func decodeArgAppendNoPlus(dst, src []byte) []byte {
if bytes.IndexByte(src, '%') < 0 {
Expand Down
4 changes: 2 additions & 2 deletions bytesconv.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func ParseUint(buf []byte) (int, error) {
var (
errEmptyInt = errors.New("empty integer")
errUnexpectedFirstChar = errors.New("unexpected first char found. Expecting 0-9")
errUnexpectedTrailingChar = errors.New("unexpected traling char found. Expecting 0-9")
errUnexpectedTrailingChar = errors.New("unexpected trailing char found. Expecting 0-9")
errTooLongInt = errors.New("too long int")
)

Expand Down Expand Up @@ -431,7 +431,7 @@ func appendQuotedPath(dst, src []byte) []byte {
// This function has no performance benefits comparing to string(b) == s.
// It is left here for backwards compatibility only.
//
// This function is deperecated and may be deleted soon.
// This function is deprecated and may be deleted soon.
func EqualBytesStr(b []byte, s string) bool {
return string(b) == s
}
Expand Down
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1524,7 +1524,7 @@ type PipelineClient struct {

// The maximum number of concurrent connections to the Addr.
//
// A sinle connection is used by default.
// A single connection is used by default.
MaxConns int

// The maximum number of pending pipelined requests over
Expand Down
2 changes: 1 addition & 1 deletion fasthttputil/inmemory_listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

// InmemoryListener provides in-memory dialer<->net.Listener implementation.
//
// It may be used either for fast in-process client<->server communcations
// It may be used either for fast in-process client<->server communications
// without network stack overhead or for client<->server tests.
type InmemoryListener struct {
lock sync.Mutex
Expand Down
2 changes: 1 addition & 1 deletion fasthttputil/pipeconns.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"time"
)

// NewPipeConns returns new bi-directonal connection pipe.
// NewPipeConns returns new bi-directional connection pipe.
func NewPipeConns() *PipeConns {
ch1 := make(chan *byteBuffer, 4)
ch2 := make(chan *byteBuffer, 4)
Expand Down
2 changes: 1 addition & 1 deletion fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ type FS struct {
// It adds CompressedFileSuffix suffix to the original file name and
// tries saving the resulting compressed file under the new file name.
// So it is advisable to give the server write access to Root
// and to all inner folders in order to minimze CPU usage when serving
// and to all inner folders in order to minimize CPU usage when serving
// compressed responses.
//
// Transparent compression is disabled by default.
Expand Down
2 changes: 1 addition & 1 deletion header.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ func (h *RequestHeader) IsGet() bool {
return h.isGet
}

// IsPost returns true if request methos is POST.
// IsPost returns true if request method is POST.
func (h *RequestHeader) IsPost() bool {
return bytes.Equal(h.Method(), strPost)
}
Expand Down
2 changes: 1 addition & 1 deletion http.go
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ func marshalMultipartForm(f *multipart.Form, boundary string) ([]byte, error) {
// boundary to w.
func WriteMultipartForm(w io.Writer, f *multipart.Form, boundary string) error {
// Do not care about memory allocations here, since multipart
// form processing is slooow.
// form processing is slow.
if len(boundary) == 0 {
panic("BUG: form boundary cannot be empty")
}
Expand Down
2 changes: 1 addition & 1 deletion lbclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ type LBClient struct {
// DefaultLBClientTimeout is the default request timeout used by LBClient
// when calling LBClient.Do.
//
// The timeout may be overriden via LBClient.Timeout.
// The timeout may be overridden via LBClient.Timeout.
const DefaultLBClientTimeout = time.Second

// DoDeadline calls DoDeadline on the least loaded client
Expand Down
6 changes: 3 additions & 3 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ func (ctx *RequestCtx) ConnID() uint64 {
// Time returns RequestHandler call time truncated to the nearest second.
//
// Call time.Now() at the beginning of RequestHandler in order to obtain
// percise RequestHandler call time.
// precise RequestHandler call time.
func (ctx *RequestCtx) Time() time.Time {
return ctx.time
}
Expand Down Expand Up @@ -1401,8 +1401,8 @@ var (
ErrPerIPConnLimit = errors.New("too many connections per ip")

// ErrConcurrencyLimit may be returned from ServeConn if the number
// of concurrenty served connections exceeds Server.Concurrency.
ErrConcurrencyLimit = errors.New("canot serve the connection because Server.Concurrency concurrent connections are served")
// of concurrently served connections exceeds Server.Concurrency.
ErrConcurrencyLimit = errors.New("cannot serve the connection because Server.Concurrency concurrent connections are served")

// ErrKeepaliveTimeout is returned from ServeConn
// if the connection lifetime exceeds MaxKeepaliveDuration.
Expand Down
2 changes: 1 addition & 1 deletion uri.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func (u *URI) Reset() {
u.parsedQueryArgs = false

// There is no need in u.fullURI = u.fullURI[:0], since full uri
// is calucalted on each call to FullURI().
// is calculated on each call to FullURI().

// There is no need in u.requestURI = u.requestURI[:0], since requestURI
// is calculated on each call to RequestURI().
Expand Down

0 comments on commit 4a16377

Please sign in to comment.