Documentation ¶
Overview ¶
Package gitConfig provides wrappers around common git configuration commands as refactored from git-mob/src/git-commands.js
Index ¶
- Constants
- Variables
- func Add(key string, value string) error
- func AddGlobal(key string, value string) error
- func Get(key string) string
- func GetAll(key string) ([]string, error)
- func GetAllGlobal(key string) ([]string, error)
- func GetGlobal(key string) string
- func GetLocal(key string) string
- func Has(key string) bool
- func HasGlobal(key string) bool
- func HasLocal(key string) bool
- func ReadAllCoAuthorsFromFile() (map[string]authors.Author, error)
- func Remove(key string) error
- func RemoveAll(key string) error
- func RemoveAllGlobal(key string) error
- func RemoveGlobal(key string) error
- func RemoveSection(key string) error
- func RemoveSectionGlobal(key string) error
- func Set(key string, value string) error
- func SetGlobal(key string, value string) error
- type ExitCode
Constants ¶
View Source
const (
)Variables ¶
View Source
var (
GlobalConfigFilePath string
)
Functions ¶
func AddGlobal ¶
AddGlobal adds a new line to the global option without altering any existing values.
func GetAllGlobal ¶
GetAllGlobal gets all values for a multi-valued option key.
func RemoveAllGlobal ¶
RemoveAllGlobal removes all the given keys from the configuration.
func RemoveGlobal ¶
RemoveGlobal removes the given key from the configuration.
func RemoveSection ¶
RemoveSection removes the given section from the configuration.
func RemoveSectionGlobal ¶
RemoveSectionGlobal removes the given section from the global configuration.
Types ¶
type ExitCode ¶ added in v0.7.2
type ExitCode int
ExitCode of the `git config` command.
const ( UnknownExitCode ExitCode = iota - 1 CommandSuccess // 0 SectionOrKeyIsInvalid SectionOrNameNotProvided FileIsInvalid FileCannotBeWritten CannotUnsetOptionWhichDoesNotExist CannotUnsetSetMultipleLinesMatched InvalidRegexp )
ExitCodes
Click to show internal directories.
Click to hide internal directories.