Skip to content

Commit

Permalink
fix: [#485] Resolve defer issue in time now. (#497)
Browse files Browse the repository at this point in the history
  • Loading branch information
030 authored Feb 24, 2024
1 parent 40355f4 commit fffd2ca
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 fffd2ca

Please sign in to comment.