gogit

package
v0.0.0-...-337d521 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Active

func Active(args []string)

func Add

func Add(args []string)

func CreateEmptyConfig

func CreateEmptyConfig()

func DeleteProfile

func DeleteProfile(config *Config, profile *Profile)

func GetGitUser

func GetGitUser() (name string, email string)

func Init

func Init(args []string)

func List

func List(args []string)

func MoveTempFile

func MoveTempFile()

func Remove

func Remove(args []string)

func SaveConfig

func SaveConfig(config *Config)

func Set

func Set(args []string)

func SetActiveHost

func SetActiveHost(remotename string, active string, desired string)

func SetActiveProfile

func SetActiveProfile(config *Config, name string)

func SetGitUser

func SetGitUser(settings *ProfileSettings)

Types

type Config

type Config struct {
	Profiles []Profile
	Active   Profile
	SetGit   bool
}

func LoadConfig

func LoadConfig() (config Config)

type Profile

type Profile struct {
	Name     string
	Active   bool
	Settings ProfileSettings
}

func FindProfile

func FindProfile(config *Config, name string) (profile *Profile)

func (*Profile) String

func (prof *Profile) String() string

type ProfileSettings

type ProfileSettings struct {
	RemoteName string
	GitName    string
	GitEmail   string
}

func (*ProfileSettings) Fill

func (settings *ProfileSettings) Fill()

Jump to

Keyboard shortcuts

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