Skip to content

Commit

Permalink
fix: [#485] Resolve defer issue in time now.
Browse files Browse the repository at this point in the history
  • Loading branch information
030 committed Feb 24, 2024
1 parent 562bc49 commit f75c066
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/n3dr/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,14 @@ Nexus3 repository and restoring them.`,

func execute() {
now := time.Now()
defer func() {
log.Debugf("n3dr was running for: '%s'", time.Since(now))
}()

if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
os.Exit(1)
}

log.Infof("n3dr was running for: '%s'", time.Since(now))
}

func init() {
Expand Down

0 comments on commit f75c066

Please sign in to comment.