l0nax/changelog-go

View on GitHub
pkg/gut/author.go

Summary

Maintainability
A
0 mins
Test Coverage
package gut

import (
    gitcfg "github.com/tcnksm/go-gitconfig"
)

// GetAuthorName returns the author name configured in the git config
//
// Deprecated: The gut package is marked as deprecated since we will drop the git dependency in the future.
func GetAuthorName() (string, error) {
    name, err := gitcfg.Username()
    if err != nil {
        log.Fatal(err)
        return "", err
    }

    return name, nil
}