qrz/vendor/github.com/markbates/pkger/apply.go
Paul Lecuq 36c5d6f2ed
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is failing
large change on qrz
- web service with json support
- web page
- cron service to update database infos
2020-05-09 19:09:27 +02:00

20 lines
384 B
Go

package pkger
import (
"github.com/markbates/pkger/pkging"
)
// Apply will wrap the current implementation
// of pkger.Pkger with the new pkg. This allows
// for layering of pkging.Pkger implementations.
func Apply(pkg pkging.Pkger, err error) error {
if err != nil {
panic(err)
return err
}
gil.Lock()
defer gil.Unlock()
current = pkging.Wrap(current, pkg)
return nil
}