gitconfig

package
v0.1.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Email

func Email() (string, error)

Email extracts git user email from `$HOME/.gitconfig` file or `$GIT_CONFIG`. This is same as Global("user.email")

func Entire

func Entire(key string) (string, error)

Entire extracts configuration value from `$HOME/.gitconfig` file , `$GIT_CONFIG`, /etc/gitconfig or include.path files.

func Local

func Local(key string) (string, error)

Local extracts configuration value from current project repository.

func OriginURL

func OriginURL() (string, error)

OriginURL extract remote origin url from current project repository. This is same as Local("remote.origin.url")

func Username

func Username() (string, error)

Username extracts git user name from `Entire gitconfig`. This is same as Entire("user.name")

Types

type ErrNotFound

type ErrNotFound struct {
	Key string
}

ErrNotFound error not found

func (*ErrNotFound) Error

func (e *ErrNotFound) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL