2019-09-21 19:51:29 +03:00
|
|
|
package pkger
|
|
|
|
|
|
|
|
import (
|
2019-09-22 00:38:03 +03:00
|
|
|
"os"
|
2019-09-21 19:51:29 +03:00
|
|
|
|
|
|
|
"github.com/markbates/pkger/pkging"
|
2019-09-22 00:38:03 +03:00
|
|
|
"github.com/markbates/pkger/pkging/pkgutil"
|
2019-09-21 19:51:29 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
var current pkging.Pkger
|
|
|
|
|
|
|
|
func Apply(pkg pkging.Pkger, err error) error {
|
2019-09-22 00:38:03 +03:00
|
|
|
if err := pkgutil.Dump(os.Stdout, pkg); err != nil {
|
2019-09-21 19:51:29 +03:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
current = pkging.Wrap(current, pkg)
|
|
|
|
return nil
|
|
|
|
}
|