From a817bdf1b932a72cd9721ab3d27aac7be7d94b85 Mon Sep 17 00:00:00 2001 From: Hau Nguyen Date: Tue, 16 Aug 2022 01:03:57 +0700 Subject: [PATCH] chore: capitalized log --- internal/cli/action.go | 2 +- internal/cli/action_generate.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/cli/action.go b/internal/cli/action.go index 231f02c..18c2d24 100644 --- a/internal/cli/action.go +++ b/internal/cli/action.go @@ -77,7 +77,7 @@ func (a *action) getFlags(c *cli.Context) { a.flags.interactive = c.Bool(flagInteractiveName) a.flags.autoCommit = c.Bool(flagAutoCommitName) - a.log("flags %+v\n", a.flags) + a.log("Flags %+v\n", a.flags) } func (a *action) log(format string, v ...interface{}) { diff --git a/internal/cli/action_generate.go b/internal/cli/action_generate.go index 88fcb3e..404cfcc 100644 --- a/internal/cli/action_generate.go +++ b/internal/cli/action_generate.go @@ -81,13 +81,13 @@ func (a *action) RunGenerate(c *cli.Context) error { if err != nil { return err } - a.log("git add output:\n%s", cmdOutput) + a.log("Git add output:\n%s", cmdOutput) cmdOutput, err = exec.CommandContext(c.Context, "git", "commit", "-m", commitMsg).CombinedOutput() if err != nil { return err } - a.log("git commit output:\n%s", cmdOutput) + a.log("Git commit output:\n%s", cmdOutput) } return nil @@ -98,7 +98,7 @@ func (a *action) getConventionalCommits(commits []git.Commit) []convention.Commi for _, commit := range commits { conventionalCommit, err := convention.NewCommit(commit) if err != nil { - a.log("failed to new conventional commits %+v: %s", commit, err) + a.log("Failed to new conventional commits %+v: %s", commit, err) // Skip bad commit and move on continue } @@ -113,7 +113,7 @@ func (a *action) getFinalOutput() string { nameWithExt := a.flags.filename + "." + a.flags.filetype finalOutput := filepath.Join(a.flags.repository, a.flags.output, nameWithExt) - a.log("final output %s", finalOutput) + a.log("Final output %s", finalOutput) return finalOutput } @@ -131,7 +131,7 @@ func (a *action) getVersion() (string, error) { return "", fmt.Errorf("invalid semver %s: %w", a.flags.version, ErrInvalidVersion) } - a.log("version %s", a.flags.version) + a.log("Version %s", a.flags.version) return a.flags.version, nil }