diff --git a/here/current.go b/here/current.go index 028d2f0..cd5ee61 100644 --- a/here/current.go +++ b/here/current.go @@ -3,8 +3,6 @@ package here import ( "path/filepath" "sync" - - "github.com/markbates/pkger/internal/debug" ) var curOnce sync.Once @@ -13,7 +11,6 @@ var current Info func Current() (Info, error) { (&curOnce).Do(func() { - debug.Debug("[HERE] Current") b, err := run("go", "env", "GOMOD") if err != nil { curErr = err diff --git a/here/here.go b/here/here.go index 2e83430..dc4ee62 100644 --- a/here/here.go +++ b/here/here.go @@ -4,15 +4,11 @@ import ( "bytes" "os" "os/exec" - - "github.com/markbates/pkger/internal/debug" ) func run(n string, args ...string) ([]byte, error) { c := exec.Command(n, args...) - debug.Debug("[HERE] %s", c.Args) - bb := &bytes.Buffer{} c.Stdout = bb c.Stderr = os.Stderr diff --git a/internal/debug/debug.go b/internal/debug/debug.go deleted file mode 100644 index 502c723..0000000 --- a/internal/debug/debug.go +++ /dev/null @@ -1,9 +0,0 @@ -// +build debug - -package debug - -import "fmt" - -func Debug(format string, a ...interface{}) { - fmt.Println("[PKGER]", fmt.Sprintf(format, a...)) -} diff --git a/internal/debug/debug_shim.go b/internal/debug/debug_shim.go deleted file mode 100644 index 6ede2e3..0000000 --- a/internal/debug/debug_shim.go +++ /dev/null @@ -1,5 +0,0 @@ -// +build !debug - -package debug - -func Debug(format string, a ...interface{}) {} diff --git a/open.go b/open.go index 287eb77..bc2b10d 100644 --- a/open.go +++ b/open.go @@ -42,7 +42,6 @@ func Open(name string) (*File, error) { return nil, err } - dubeg("Open", pt.String()) f, ok := filesCache.Load(pt) if !ok { return openDisk(pt) @@ -58,7 +57,6 @@ func Open(name string) (*File, error) { } func openDisk(pt Path) (*File, error) { - dubeg("openDisk", pt.String()) info, err := Info(pt.Pkg) if err != nil { return nil, err diff --git a/path.go b/path.go index 8bb37fa..47cc7f0 100644 --- a/path.go +++ b/path.go @@ -14,7 +14,6 @@ type Path struct { } func Parse(p string) (Path, error) { - dubeg("Parse", p) p = strings.Replace(p, "\\", "/", -1) pt, ok := pathsCache.Load(p) if ok { diff --git a/pkger.go b/pkger.go index 4b31814..58a69d2 100644 --- a/pkger.go +++ b/pkger.go @@ -12,7 +12,6 @@ import ( "sync" "github.com/markbates/pkger/here" - "github.com/markbates/pkger/internal/debug" ) var filesCache = &filesMap{} @@ -34,11 +33,6 @@ func ReadFile(s string) ([]byte, error) { return ioutil.ReadAll(f) } -func dubeg(key, format string, args ...interface{}) { - s := fmt.Sprintf(format, args...) - debug.Debug("[%s|%s] %s", key, s) -} - func Unpack(ind string) error { packed = true packMU.Lock() @@ -99,7 +93,6 @@ func Pack(out io.Writer, paths []Path) error { continue } - dubeg("Pack", "%s", p) filesCache.Store(p, f) f.Close()