diff --git a/main.go b/main.go index e7d753b..dabc2d4 100644 --- a/main.go +++ b/main.go @@ -3,14 +3,6 @@ package main import ( "bytes" "fmt" - "os" - "path" - "path/filepath" - "regexp" - "runtime/debug" - "strings" - "time" - "github.com/coveooss/gotemplate/v3/collections" "github.com/coveooss/gotemplate/v3/hcl" "github.com/coveooss/gotemplate/v3/json" @@ -23,6 +15,12 @@ import ( "github.com/coveooss/multilogger/errors" "github.com/fatih/color" "github.com/sirupsen/logrus" + "os" + "path" + "path/filepath" + "regexp" + "runtime/debug" + "strings" ) var version = "major.minor.patch # locally built, should be replaced by the build process with -ldflags \"-X main.version=\"" @@ -38,7 +36,6 @@ See: https://coveooss.github.io/gotemplate for complete documentation. ` func runGotemplate() (exitCode int) { - start := time.Now() defer func() { if rec := recover(); rec != nil { errPrintf(color.RedString("Recovered %v\n"), rec) @@ -312,8 +309,6 @@ func runGotemplate() (exitCode int) { if !*printOutput { utils.TerraformFormat(resultFiles...) } - duration := time.Since(start) - fmt.Println(fmt.Sprintf("Took %dms", duration.Milliseconds())) return } diff --git a/template/extra_runtime.go b/template/extra_runtime.go index 2feff20..97e406a 100644 --- a/template/extra_runtime.go +++ b/template/extra_runtime.go @@ -4,17 +4,15 @@ import ( "bytes" "errors" "fmt" + "github.com/coveooss/gotemplate/v3/collections" + "github.com/coveooss/gotemplate/v3/utils" + multicolor "github.com/coveooss/multilogger/color" + "github.com/fatih/color" "os" "os/exec" "path" "reflect" "strings" - "time" - - "github.com/coveooss/gotemplate/v3/collections" - "github.com/coveooss/gotemplate/v3/utils" - multicolor "github.com/coveooss/multilogger/color" - "github.com/fatih/color" ) const ( @@ -435,8 +433,6 @@ func (t *Template) runTemplate(source string, args ...interface{}) (result, file } func optimizedRunTemplate(t *Template, withClone bool, source string, args ...interface{}) (result, filename string, err error) { - start := time.Now() - if source == "" { return } @@ -533,8 +529,6 @@ func optimizedRunTemplate(t *Template, withClone bool, source string, args ...in if withClone { t.context = parentContext } - duration := time.Since(start) - fmt.Println(fmt.Sprintf("Took 'runTemplate()' %dms", duration.Milliseconds())) return }