Skip to content

Releases: paologaleotti/blaze

v1.3.0

09 Jul 19:10
Compare
Choose a tag to compare

New for version v1.3.0

Better Env variable validation

  • Changed syntax for internal environment variable initialization (see internal/api/env.go)
  • More declarative and simple initialization for EnvConfig struct
  • New function: GetEnvOrDefault to set the env to a default value instaed of panicking with GetEnvOrPanic
  • This somehow decreased by a little bit the server startup time

Default CORS configuration

  • Added default CORS config in httpcore
  • New config now comes with MaxAge header set by default (for HTTP browser caching)

Other

  • Upgrade all dependencies

Full Changelog: v1.2.0...v1.3.0

v1.2.0

15 Apr 19:17
Compare
Choose a tag to compare

New for version v1.2.0

Better HTTP errors handling

  • New method for ApiError for better HTTP error handling: .With() to append a Go error to the API error message
  • .Msg() method for ApiError now appends a string to the API error message instaed of an error (use With to append errors)
  • Breaking: if you want to upgrade your app to this new version you need to migrate old error handling using the new methods.
  • You can find examples on how to use them in the official wiki

Init logic and handler refactoring

  • Router initialization with default middlewares (timeout, panic recovery, logger...) has been moved in api/init.go for better readability and consistency (instaed of pkg/httpcore/router)
  • HTTP Handlers has been moved in /handlers package to scale better when adding many handlers for different business logic domains

Minor improvements

  • Removed useless allocations when replying with an ApiError

Full Changelog: v1.1.0...v1.2.0

v1.1.0

02 Apr 11:35
Compare
Choose a tag to compare

What's Changed

  • Support for Go 1.22
  • New structued logging with zerolog, faster and more idiomatic
  • Added several strict linting rules and updated golangci-lint config
  • Upgraded all direct and indirect packages
  • Fixed security issues (bump dependencies)
  • Changed AWS Lambda base image to the newer provided.al2023 (faster and lighter) in serverless branch
  • Improved example OpenAPI template

Full Changelog: v1.0.0...v1.1.0

v1.0.0

25 Feb 15:55
Compare
Choose a tag to compare