Refactor debug into debug module

This commit is contained in:
Alexander Neumann committed 2015-01-17 16:32:13 +01:00
1 parent bcb19c811b
commit 25a214809b
18 files changed
+318 -238

No files matched your search

+3
View File
@@ -12,6 +12,7 @@ import (
"github.com/jessevdk/go-flags"
"github.com/restic/restic"
"github.com/restic/restic/backend"
"github.com/restic/restic/debug"
)
var version = "compiled manually"
@@ -166,6 +167,8 @@ func main() {
// defer profile.Start(profile.MemProfileRate(100000), profile.ProfilePath(".")).Stop()
opts.Repo = os.Getenv("RESTIC_REPOSITORY")
debug.Log("restic", "main %#v", os.Args)
_, err := parser.Parse()
if e, ok := err.(*flags.Error); ok && e.Type == flags.ErrHelp {
os.Exit(0)