Skip to content

Commit

Permalink
docs: Improve code comments
Browse files Browse the repository at this point in the history
  • Loading branch information
trallnag committed Oct 22, 2023
1 parent cdd1093 commit 5c4f3a4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,17 @@ var version = ""
func main() {
zerolog.TimeFieldFormat = zerolog.TimeFormatUnix

// Handle configuration.
configPath, err := filepath.Abs("config.yaml")
if err != nil {
log.Fatal().Err(err).Msg("Failed to find config file.")
}

config, err := NewConfig(configPath)
if err != nil {
log.Fatal().Err(err).Msg("Failed to create config.")
}

// Set up logging based on config.
if config.Logging.Pretty {
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr})
}
Expand Down Expand Up @@ -69,7 +70,7 @@ func main() {
Msg("Failed to create Kubernetes client.")
}

// AWS CloudWatch setup
// AWS CloudWatch setup.
log.Info().Msg("Creating AWS config.")
awsConfig, err := awsconfig.LoadDefaultConfig(context.TODO())
if err != nil {
Expand Down

0 comments on commit 5c4f3a4

Please sign in to comment.