pkger/apply_debug.go

24 lines
367 B
Go
Raw Permalink Normal View History

2019-09-22 23:47:40 +03:00
// +build debug
package pkger
import (
"os"
"github.com/markbates/pkger/pkging"
"github.com/markbates/pkger/pkging/pkgutil"
)
func Apply(pkg pkging.Pkger, err error) error {
gil.Lock()
defer gil.Unlock()
2019-10-16 18:07:57 +03:00
if err != nil {
return err
}
2019-09-22 23:47:40 +03:00
if err := pkgutil.Dump(os.Stdout, pkg); err != nil {
return err
}
current = pkging.Wrap(current, pkg)
return nil
}