convert string conversion manually for config.Expire
Some checks failed
CodeQL / Analyze (go) (push) Has been cancelled
Go / Tests (1.19) (push) Has been cancelled
Go / Tests (1.20) (push) Has been cancelled
Go / Tests (1.21) (push) Has been cancelled
golangci-lint / lint (push) Has been cancelled

Better than taking a string, or letting logrus convert it.
This commit is contained in:
raf 2024-08-13 10:33:09 +03:00
parent 346864da03
commit 057bca7b02
Signed by: NotAShelf
GPG key ID: AF26552424E53993

View file

@ -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