Webgo Versions Save

A microframework to build web apps; with handler chaining, middleware support, and most of all; standard library compliant HTTP handlers(i.e. http.HandlerFunc).

v6.6.5

1 year ago

[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

v6.3.1

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)

v6.2.2

2 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

v5.3.2

2 years ago

[patch] fixed bug when trailing slash configuration was being ignored when using wildcard in URI [-] removed some unused constants

v5.3.1

2 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

v5.2.0

2 years ago

[minor] router.Use method for adding middleware, is now variadic [minor] 2 new helper methods webgo.SetError(*http.Request, error) & webgo.GetError(r) [-] refer SetError, GetError for usage details

v5.0.0

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

v4.1.10

3 years ago

Fixed a critical issue while creating regex patter for URIs without parameters. It's surprising it was never caught before!

v4.1.9

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

v4.1.3

3 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