From 057bca7b028555d3b29d38af3a5f0d3fbf006233 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Tue, 13 Aug 2024 10:33:09 +0300 Subject: [PATCH] convert string conversion manually for config.Expire Better than taking a string, or letting logrus convert it. --- cmd/root.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/root.go b/cmd/root.go index fdc0c72..6f7cbb1 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -3,6 +3,7 @@ package cmd import ( "net/http" "os" + "strconv" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" @@ -43,7 +44,7 @@ var rootCmd = &cobra.Command{ log.Infof("Template directory: %s", config.TemplateDir) log.Infof("Log directory: %s", config.LogDir) log.Infof("Paste storage directory: %s", config.PasteDir) - log.Infof("Expire: %s", config.Expire) + log.Infof("Expire: %s", strconv.Itoa(config.Expire)) } // Set the port based on the configuration or the flag