Skip to content

Commit f75c066

Browse files
committed
fix: [#485] Resolve defer issue in time now.
1 parent 562bc49 commit f75c066

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmd/n3dr/root.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,14 @@ Nexus3 repository and restoring them.`,
6060

6161
func execute() {
6262
now := time.Now()
63+
defer func() {
64+
log.Debugf("n3dr was running for: '%s'", time.Since(now))
65+
}()
6366

6467
if err := rootCmd.Execute(); err != nil {
6568
fmt.Println(err)
6669
os.Exit(1)
6770
}
68-
69-
log.Infof("n3dr was running for: '%s'", time.Since(now))
7071
}
7172

7273
func init() {

0 commit comments

Comments
 (0)