WebGo v4.1.3 Release Notes
Release Date: 2020-07-14 // 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
0๏ธโฃ [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 usingw.Write
where 'w' is the http.ResponseWriter, incmd/main.go
โ [-] added tests for logger
๐ [-] no performance impact with these changes
๐ [-] removed the empty deprecation logs function
๐ [-] removed unwanted comments fromcmd/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 ifw.Write([]byte)
where 'w' is the http.ResponseWriter, works as expected
Previous changes from v4.0.4
-
[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 resultsBenchmarkGetNoParams-8 809166 1433 ns/op BenchmarkGetWithParams-8 229358 4878 ns/op BenchmarkPostWithParams-8 204218 4904 ns/op