Skip to content

Commit

Permalink
Spelling and grammar fixes (#820)
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed May 2, 2023
1 parent 8cbdac6 commit 7f28096
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ incremental, with the architecture and api being the same today as it was origin
makes chi a pretty easy project to maintain, as well thanks to the many amazing community contributions over the years
to who all help make chi better (total of 86 contributors to date -- thanks all!).

Chi has been an labour of love, art and engineering, with the goals to offer beautiful ergonomics, flexibility, performance
Chi has been a labour of love, art and engineering, with the goals to offer beautiful ergonomics, flexibility, performance
and simplicity when building HTTP services with Go. I've strived to keep the router very minimal in surface area / code size,
and always improving the code wherever possible -- and as of today the `chi` package is just 1082 lines of code (not counting
middlewares, which are all optional). As well, I don't have the exact metrics, but from my analysis and email exchanges from
companies and developers, chi is used by thousands of projects around the world -- thank you all as there is no better form of
joy for me than to have art I had started be helpful and enjoyed by others. And of course I use chi in all of my own projects too :)

For me, the asthetics of chi's code and usage are very important. With the introduction of Go's module support
For me, the aesthetics of chi's code and usage are very important. With the introduction of Go's module support
(which I'm a big fan of), chi's past versioning scheme choice to v2, v3 and v4 would mean I'd require the import path
of "github.com/go-chi/chi/v4", leading to the lengthy discussion at https://github.com/go-chi/chi/issues/462.
Haha, to some, you may be scratching your head why I've spent > 1 year stalling to adopt "/vXX" convention in the import
Expand Down Expand Up @@ -289,7 +289,7 @@ Cheers all, happy coding!

## v2.0.0-rc1 (2016-07-26)

- Huge update! chi v2 is a large refactor targetting Go 1.7+. As of Go 1.7, the popular
- Huge update! chi v2 is a large refactor targeting Go 1.7+. As of Go 1.7, the popular
community `"net/context"` package has been included in the standard library as `"context"` and
utilized by `"net/http"` and `http.Request` to managing deadlines, cancelation signals and other
request-scoped values. We're very excited about the new context addition and are proud to
Expand Down
2 changes: 1 addition & 1 deletion _examples/graceful/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func service() http.Handler {
// so consider the work here as some background routine to fetch a long running
// search query to find as many results as possible, but, instead we cut it short
// and respond with what we have so far. How a shutdown is handled is entirely
// up to the developer, as some code blocks are preemptable, and others are not.
// up to the developer, as some code blocks are preemptible, and others are not.
time.Sleep(5 * time.Second)

w.Write([]byte(fmt.Sprintf("all done.\n")))
Expand Down
2 changes: 1 addition & 1 deletion _examples/rest/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ func (a *ArticleRequest) Bind(r *http.Request) error {

// a.User is nil if no Userpayload fields are sent in the request. In this app
// this won't cause a panic, but checks in this Bind method may be required if
// a.User or futher nested fields like a.User.Name are accessed elsewhere.
// a.User or further nested fields like a.User.Name are accessed elsewhere.

// just a post-process after a decode..
a.ProtectedID = "" // unset the protected ID
Expand Down
4 changes: 2 additions & 2 deletions middleware/compress.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func NewCompressor(level int, types ...string) *Compressor {
// The encoding should be a standardised identifier. See:
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding
//
// For example, add the Brotli algortithm:
// For example, add the Brotli algorithm:
//
// import brotli_enc "gopkg.in/kothar/brotli-go.v0/enc"
//
Expand Down Expand Up @@ -285,7 +285,7 @@ func (cw *compressResponseWriter) isCompressable() bool {
contentType = contentType[0:idx]
}

// Is the content type compressable?
// Is the content type compressible?
if _, ok := cw.contentTypes[contentType]; ok {
return true
}
Expand Down
2 changes: 1 addition & 1 deletion middleware/middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestWrapWriterHTTP2(t *testing.T) {
}
_, rf := w.(io.ReaderFrom)
if rf {
t.Fatal("request should not have been a io.ReaderFrom")
t.Fatal("request should not have been an io.ReaderFrom")
}
_, ps := w.(http.Pusher)
if !ps {
Expand Down
2 changes: 1 addition & 1 deletion middleware/throttle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestThrottleBacklog(t *testing.T) {

var wg sync.WaitGroup

// The throttler proccesses 10 consecutive requests, each one of those
// The throttler processes 10 consecutive requests, each one of those
// requests lasts 1s. The maximum number of requests this can possible serve
// before the clients time out (5s) is 40.
for i := 0; i < 40; i++ {
Expand Down
2 changes: 1 addition & 1 deletion mux.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func (mx *Mux) Head(pattern string, handlerFn http.HandlerFunc) {
mx.handle(mHEAD, pattern, handlerFn)
}

// Options adds the route `pattern` that matches a OPTIONS http method to
// Options adds the route `pattern` that matches an OPTIONS http method to
// execute the `handlerFn` http.HandlerFunc.
func (mx *Mux) Options(pattern string, handlerFn http.HandlerFunc) {
mx.handle(mOPTIONS, pattern, handlerFn)
Expand Down

0 comments on commit 7f28096

Please sign in to comment.