Documentation ¶
Index ¶
- func Exists() bool
- func GetUser() (user string, email string)
- func RemoveGlobalUser()
- func SetGitPath(gitPath string)
- func SetGlobalUser(user string, email string)
- func Version() string
- type Profile
- type Repo
- type UserProfileConfig
- func (u UserProfileConfig) AddProfile(name string, user string, email string)
- func (u UserProfileConfig) CheckProfile(name string) bool
- func (u UserProfileConfig) DeleteProfile(name string)
- func (u UserProfileConfig) EditProfile(name string, user string, email string)
- func (u UserProfileConfig) GetAllProfiles() (profiles []Profile)
- func (u UserProfileConfig) GetProfile(name string) (profile Profile)
- func (u UserProfileConfig) Path() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RemoveGlobalUser ¶
func RemoveGlobalUser()
RemoveGlobalUser removes user from the global git config
func SetGitPath ¶
func SetGitPath(gitPath string)
SetGitPath will set a custom git path if necessary
func SetGlobalUser ¶
SetGlobalUser sets the user for the global git config
Types ¶
type Profile ¶
Profile defines a git profile
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
Repo allows you to exectue actions on a specific git project
func (Repo) RemoveUser ¶
func (r Repo) RemoveUser()
RemoveUser removes the set user from the git repo
type UserProfileConfig ¶
type UserProfileConfig struct {
// contains filtered or unexported fields
}
UserProfileConfig is the config file we want to edit
func NewUserProfileConfig ¶
func NewUserProfileConfig(hintPath string) (*UserProfileConfig, error)
NewUserProfileConfig initializes and returns a new UserProfileConfig
func (UserProfileConfig) AddProfile ¶
func (u UserProfileConfig) AddProfile(name string, user string, email string)
AddProfile adds a profile
func (UserProfileConfig) CheckProfile ¶
func (u UserProfileConfig) CheckProfile(name string) bool
CheckProfile checks if name exists as a profile
func (UserProfileConfig) DeleteProfile ¶
func (u UserProfileConfig) DeleteProfile(name string)
DeleteProfile removes a profile from the config
func (UserProfileConfig) EditProfile ¶
func (u UserProfileConfig) EditProfile(name string, user string, email string)
EditProfile edits a profile
func (UserProfileConfig) GetAllProfiles ¶
func (u UserProfileConfig) GetAllProfiles() (profiles []Profile)
GetAllProfiles gets all of the saved profiles
func (UserProfileConfig) GetProfile ¶
func (u UserProfileConfig) GetProfile(name string) (profile Profile)
GetProfile gets the profile info
func (UserProfileConfig) Path ¶
func (u UserProfileConfig) Path() string
Path returns the user profile path