From 39bd97487ba77e0c5bab191e31d7bd3baf5aaf4a Mon Sep 17 00:00:00 2001 From: Wiktor Zykubek Date: Sun, 29 Dec 2024 05:51:16 +0100 Subject: [PATCH] style: edit error messages to start with lowercase --- git_utils.go | 2 +- licenser.go | 2 +- main.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/git_utils.go b/git_utils.go index 94ce355..e51e3fa 100644 --- a/git_utils.go +++ b/git_utils.go @@ -10,7 +10,7 @@ func gitUserData(key string) (string, error) { cmd := exec.Command("git", "config", "--get", key) out, err := cmd.Output() if err != nil { - return "", errors.New("Can't read Git config") + return "", errors.New("can't read Git config") } value := strings.TrimSpace(string(out)) diff --git a/licenser.go b/licenser.go index 4fd59f4..51d01df 100644 --- a/licenser.go +++ b/licenser.go @@ -37,7 +37,7 @@ func (l *Licenser) ParseTemplate() (LicenseTemplate, error) { func (l *Licenser) Generate() error { license, err := l.ParseTemplate() if err != nil { - return errors.New("Not supported license") + return errors.New("usupported license") } tmpl, _ := template.New(l.LicenseID).Parse(license.Body) diff --git a/main.go b/main.go index f52437e..a7de33b 100644 --- a/main.go +++ b/main.go @@ -26,7 +26,7 @@ func main() { } licenseCtx, err := NewLicenseContext(*AuthorName, *AuthorEmail) - if err != nil && err.Error() == "Can't read Git config" { + if err != nil && err.Error() == "can't read Git config" { fmt.Printf( "Error: Can't read Git config.\n\nUse --name \"NAME\" and --email EMAIL instead.\n", ) @@ -40,7 +40,7 @@ func main() { } err = licenser.Generate() - if err != nil && err.Error() == "Not supported license" { + if err != nil && err.Error() == "usupported license" { fmt.Printf("Error: There is no '%s' license\n\nAvailable licenses:\n", *LicenseID) listLicenses() os.Exit(2)