WebGo v4.1.3 Release Notes

Release Date: 2020-07-14 // almost 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 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


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 results

            BenchmarkGetNoParams-8 809166 1433 ns/op
            BenchmarkGetWithParams-8 229358 4878 ns/op
            BenchmarkPostWithParams-8 204218 4904 ns/op