Refactoring - Renamed CLI flags structure

This commit is contained in:
Emmanuel BENOîT 2021-12-04 10:51:03 +01:00
parent 3266f3f818
commit 0d001985fe
2 changed files with 4 additions and 4 deletions

View file

@ -46,7 +46,7 @@ func configureLogFile(path string) {
}
// Configure the logging library based on the various command line flags.
func configureLogging(flags cliFlags) error {
func configureLogging(flags tCliFlags) error {
log = logrus.NewEntry(logrus.New())
log.Logger.SetFormatter(&logrus.TextFormatter{
DisableColors: true,

View file

@ -8,7 +8,7 @@ import (
type (
// This structure contains all values that may be set from the command line.
cliFlags struct {
tCliFlags struct {
// The path to the configuration file.
cfgFile string
// Quiet mode. Will disable logging to stderr.
@ -25,9 +25,9 @@ type (
)
// Parse command line options.
func parseCommandLine() cliFlags {
func parseCommandLine() tCliFlags {
var help bool
flags := cliFlags{}
flags := tCliFlags{}
golf.StringVarP(&flags.cfgFile, 'c', "config", "/etc/fetch-certificates.yml", "Path to the configuration file.")
golf.StringVarP(&flags.logFile, 'f', "log-file", "", "Path to the log file.")