Documentation
¶
Overview ¶
Package cliconfig manages the client-side configuration: named forge instances at ~/.config/forge/config.toml, and parsing of origin remote URLs so commands run inside a clone need no --repo argument.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Instance ¶
type Instance struct {
Host string `toml:"host"`
Port int `toml:"port,omitempty"`
User string `toml:"user,omitempty"`
// SSHOptions are extra arguments passed to the ssh binary verbatim,
// e.g. ["-i", "~/.ssh/forge_ed25519"]. Most setups need none: the
// system ssh already honors ~/.ssh/config and the agent.
SSHOptions []string `toml:"ssh_options,omitempty"`
// NoMultiplex turns off SSH connection sharing for this instance. On
// by default: one handshake per five minutes instead of one per
// command.
NoMultiplex bool `toml:"no_multiplex,omitempty"`
}
func ParseRemoteURL ¶
ParseRemoteURL extracts the instance coordinates and owner/name from a git remote URL in ssh:// or scp-like form.
func (Instance) CloneURL ¶
CloneURL returns the ssh:// URL for owner/name on this instance.
Source Files
¶
- cliconfig.go
Click to show internal directories.
Click to hide internal directories.