Skip to content

Commit

Permalink
Added error forwarding to Build method
Browse files Browse the repository at this point in the history
  • Loading branch information
snovichkov committed Nov 28, 2018
1 parent eaba3ad commit ff013cc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ut.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (b *Bundle) Name() string {

// Build implements the glue.Bundle interface.
func (b *Bundle) Build(builder *di.Builder) error {
builder.Add(di.Def{
return builder.Add(di.Def{
Name: BundleName,
Build: func(ctn di.Container) (_ interface{}, err error) {
var translator = ut.New(b.fallback, b.locales...)
Expand All @@ -106,8 +106,6 @@ func (b *Bundle) Build(builder *di.Builder) error {
return translator, nil
},
})

return nil
}

// apply implements Option.
Expand Down

0 comments on commit ff013cc

Please sign in to comment.