Skip to content

v2.3.0

Compare
Choose a tag to compare
@instabledesign instabledesign released this 29 Jan 07:13
· 16 commits to master since this release
c7e09db

⚠️ [BC] Signature change

// <= v2.2.0
func (m Middlewares) Append(middleware ...Middleware) Middlewares {}
func (m Middlewares) Prepend(middleware ...Middleware) Middlewares {}
func (t Tripperwares) Append(tripperwares ...Tripperware) Tripperwares {}
func (t Tripperwares) Prepend(tripperwares ...Tripperware) Tripperwares {}
// >= v2.3.0 Pointer receiver
func (m *Middlewares) Append(middleware ...Middleware) Middlewares {}
func (m *Middlewares) Prepend(middleware ...Middleware) Middlewares {}
func (t *Tripperwares) Append(tripperwares ...Tripperware) Tripperwares {}
func (t *Tripperwares) Prepend(tripperwares ...Tripperware) Tripperwares {}

Implement some helper method

  • func (m Middleware) AppendIf(condition bool, middlewares ...Middleware) Middlewares {}
  • func (m Middleware) PrependIf(condition bool, middlewares ...Middleware) Middlewares {}
  • func (m *Middlewares) AppendIf(condition bool, middlewares ...Middleware) Middlewares {}
  • func (m *Middlewares) PrependIf(condition bool, middlewares ...Middleware) Middlewares {}
  • func (t Tripperware) AppendIf(condition bool, tripperwares ...Tripperware) Tripperwares {}
  • func (t Tripperware) PrependIf(condition bool, tripperwares ...Tripperware) Tripperwares {}
  • func (t *Tripperwares) AppendIf(condition bool, tripperwares ...Tripperware) Tripperwares {}
  • func (t *Tripperwares) PrependIf(condition bool, tripperwares ...Tripperware) Tripperwares {}