[patch] fixed bug in URI match/params
[patch] better URI matching, reduced allocations
[patch] resources are released even in case of panic (deferred)
[-] added benchmark
[-] minor changes to the sample SSE implementation (refactored to use serviceworker)
[-] updated SSE README for clarity
[patch] refactored SSE for more capabilities of customizing
[-] improved reattempting of SSE reconnection, in the sample app
[patch] added hooks for create and remove clients from SSE active clients list
[-] removed os.ReadFile usage to make the sample app compatible with Go 1.13
[-] setting correct heading size for Server-Sent Eevents
[minor] added new Broadcast
method to sse extension for easily broadcasting a message to all active clients (#40)
[-] updated sample app for making things prettier
[-] updated the JS in sample app to be modular, cleaner
[-] updated documentation and some cosmetic changes to the sample app
[minor] added helper method to get count of active clients
[patch] renamed GetClientMessageChan
to ClientMessageChan
[-] updated the sample app's HTML page to show details slightly better
[-] breaking change in function name, since previous version was released only 24hrs ago. I considered it ok to break it this soon
[minor] Added a new extension for handling Server Sent Events (SSE)
[-] The example app shows how to use this
Published by bnkamalesh over 2 years ago
[minor] URI patterns now support multiple wildcards, you can form more patterns. e.g. all routes ending with /hello
[-] Refer to the test TestWildcardMadness in router_test.go to see sample usage
[patch] Fixed regression introduced while fixing trailing slash config support for wildcard routes in previous release
[-] regression was introduced after changing the regex used for route matching. This releases completely removes regex (there's some decent performance improvement, yay! but with slightly more memory consumption)
Published by bnkamalesh about 3 years ago
[major] NewRouter function now accepts variadic Routes instead of slice of Routes (breaking change)
[minor] Router now has a convenience method Add(routes...*Route)
[minor] Route grouping feature added (usage available in the sample app, cmd/main.go
)
[-] updated tests
[-] fixed module version in go.mod
[-] fixed v6 imports
[patch] fixed middleware not applied on routegroups
Published by bnkamalesh about 3 years ago
[patch] fixed bug when trailing slash configuration was being ignored when using wildcard in URI
[-] removed some unused constants
Published by bnkamalesh about 3 years ago
[minor] added a new helper function to get the original HTTP response writer from Webgo's custom response writer
[patch] remove check when response is already written, prevent writing any further
[-] the blocking behaviour was breaking large responses like files and such
Published by bnkamalesh over 3 years ago
[major] Removed deprecated & dead code
[-] Render404 was removed. This can be easily replaced using Render
function
[-] middleware package was removed. There are now sub packages for individual middleware functions, middleware/cors, middleware/accesslogs
[-] cleaned up all unit tests
[-] updated travis config to use correct version in tests
[-] updated minimum test version of Go to 1.13 to support errors.Is
Published by bnkamalesh over 3 years ago
Fixed a critical issue while creating regex patter for URIs without parameters. It's surprising it was never caught before!
Published by bnkamalesh over 3 years ago
[patch] refactored router.Serve method to avoid context payload injection to special handlers
[patch] removed deadcode Route.matchAndGet
[patch] fixed panic when using CORS middleware with nil configuration
[patch] using response writer from pool for chained handlers instead of creating a new instance
[patch] other small refactor for cleaner/easy to understand code
[patch] removed unused field from context payload
Published by bnkamalesh over 4 years ago
[minor] added webgo.ResponseStatus(rw http.ResponseWriter) int
which returns response status code
[patch] fixed a bug which did not send appropriate JSON response header for the convenience methods
[patch] fixed accesslog middleware not printing valid http status code when not using webgo response methods
[patch] fixed regression introduced in 4.0.4, where default http status was 0, now it's set to 200
[patch] refactored accesslog & CORS middleware (moved to new package)
[patch] refactored global logger for improved modularity
[patch] Removed unnecessary WriteHeader from SendResponse, SendError. Added relevant header write for Send
[-] added handler which directly writes using w.Write
where 'w' is the http.ResponseWriter, in cmd/main.go
[-] added tests for logger
[-] no performance impact with these changes
[-] removed the empty deprecation logs function
[-] removed unwanted comments from cmd/main.go
[-] updated README with correct version number & updated important section highlight the regression
[-] updated README with correct version number and updated the sample code
[-] updated tests to test if w.Write([]byte)
where 'w' is the http.ResponseWriter, works as expected
Published by bnkamalesh over 4 years ago
[patch] added http.CloseNotifier implementation
[patch] refactored response writer and context payload usage
[patch] removed ineffectual assignments
[patch] removed redundant check of customResponseWriter.headerWritten
[-] fixed typos in comments
[-] refactored for better readability at multiple places
[-] MacBook Pro (13-inch, 2019, Two Thunderbolt 3 ports), OS: 10.15.5 (19F101), Go 1.14.4 darwin/amd64
[-] benchmark results
BenchmarkGetNoParams-8 809166 1433 ns/op
BenchmarkGetWithParams-8 229358 4878 ns/op
BenchmarkPostWithParams-8 204218 4904 ns/op
Published by bnkamalesh over 4 years ago
[major] removed deprecations from 3.x
[patch] refactored context payload remove unused fields
[patch] introduced new Params function for fetching URI parameters
[-] regression introduced in 3.5.4, for URI params computing. Was computing escaped values again, when r.URL.EscapedPath()
already gives escaped value
[-] README updated with new verison number & details
[-] releasenotes.md was removed in favour of git tag messages & github releases
[-] benchmark results, run on MacbookPro 2019, Catalina 10.15.5 (19F101), 16 GB 2133 MHz LPDDR3, 1.4 GHz Quad-Core Intel Core i5
BenchmarkGetNoParams-8 741256 1606 ns/op
BenchmarkGetWithParams-8 223771 5062 ns/op
BenchmarkPostWithParams-8 220663 5131 ns/op
Published by bnkamalesh over 4 years ago
Chances since v2.4.1
[minor] deprecation logs are now printed while initial setup (list available in Readme)
[patch] Send,SendResponse,Render methods would log and respond with Internal server error in case of errors while writing response
[patch] refactored route.init method to reduce cognitive complexity & to smaller functions
[patch] refactored URI matching methods to reduce cognitive complexity, to smaller functions & minor performance improvement
[patch] introduced new function ContextPayload.URIParams(*http.Request)
, deprecated ContextPayload.Params
[-] updated contribution.md
[minor] refactored serve method to reduce cyclomatic complexity. This provides performance improvement
[patch] updated go.mod file to use Go version 1.14
[patch] updated travis config to remove go version from go.mod
[patch] added function to allow configuration of default logger
[patch] duplicate route name log is made into a "info" log instead of warn
[patch] updated README with valid code
[minor] Implemented http.Hijacker
interface
[patch] updated how middleware is used on NotFound & NotImplemented handlers
[patch] refactored for better readability
[patch] overwriting the actual request instance
[patch] added test to check if webgo context is avaialble in middleware
[patch] updated ServeHTTP to inject webgo context into the request earlier, to make it available to middleware as well
[patch] removed some variable declaration to avoid memory allocation
[patch] updated sample app to show chaining
[patch] minor updates to tests and sample app
[minor] middleware will now be excecuted for the router's NotFound handler as well
[minor] Method not implemented status is now executed using a handler similar to NotFound
[patch] updated responses test to use t.Error instead of Log & Fail
updated test to use v3
middleware package updated
context payload updated
documentation update
fixed go.mod
fixed go.mod v2
Webgo context is now available inside middleware too!
Published by bnkamalesh over 5 years ago
Published by bnkamalesh about 6 years ago
Published by bnkamalesh about 6 years ago
Updated Middleware
- Backward incompatible updates
- CORS middleware functions are updated and now accepts list of supported/allowed domains
- The middleware functions will default to "*" if no domains are passed to the functions
Published by bnkamalesh over 6 years ago
All known bugs squashed.
All of the items in the wishlist completed.
Stable release :)
Published by bnkamalesh over 6 years ago
Minor semantic changes. Renamed middlewares
to middleware
. No other major change.
Published by bnkamalesh over 6 years ago
Globals
)router.StartHTTPS
P.S: This release brought in a few changes which are not backward compatible.
Published by bnkamalesh over 6 years ago
Minor improvement in the ServeHTTP function