Skip to content

v1.19.0

Compare
Choose a tag to compare
@sywhang sywhang released this 04 Jan 19:01
· 106 commits to master since this release
887c07c

Added

  • fx.RecoverFromPanics Option which allows Fx to recover from user-provided constructors
    and invoked functions.
  • fx.Private that allows the constructor to limit the scope of its outputs to the wrapping
    fx.Module.
  • ExitCode ShutdownOption which allows setting custom exit code at the end of app
    lifecycle.
  • Wait which returns a channel that can be used for waiting on application shutdown.
  • fxevent/ZapLogger now exposes UseLogLevel and UseErrorLevel methods to set
    the level of the Zap logs produced by it.
  • Add lifecycle hook-convertible methods: StartHook, StopHook, StartStopHook
    that can be used with more function signatures.

Changed

  • fx.WithLogger can now be passed at fx.Module level, setting custom logger at
    Module scope instead of the whole App.

Fixed

  • fx.OnStart and fx.OnStop Annotations now work with annotated types that was
    provided by the annotated constructor.
  • fxevent/ZapLogger: Errors from fx.Supply are now logged at Error level, not
    Info.
  • A race condition in lifecycle Start/Stop methods.
  • Typos in docs.