6
0
mirror of https://github.com/grdl/git-get.git synced 2026-02-07 02:05:37 +00:00

Make the URL scheme default to ssh instead of https and make it configurable

This commit is contained in:
Grzegorz Dlugoszewski
2020-09-02 03:14:01 +02:00
parent ccbee82f0b
commit 0d797d625a
5 changed files with 84 additions and 57 deletions

View File

@@ -17,21 +17,22 @@ const GitgetPrefix = "gitget"
// CLI flag keys.
var (
KeyBranch = "branch"
KeyDump = "dump"
KeyDefaultHost = "host"
KeyFetch = "fetch"
KeyOutput = "out"
KeySkipHost = "skip-host"
KeyReposRoot = "root"
KeyBranch = "branch"
KeyDump = "dump"
KeyDefaultHost = "host"
KeyFetch = "fetch"
KeyOutput = "out"
KeyDefaultScheme = "scheme"
KeySkipHost = "skip-host"
KeyReposRoot = "root"
)
// Defaults is a map of default values for config keys.
var Defaults = map[string]string{
KeyDefaultHost: "github.com",
KeyOutput: OutTree,
KeyReposRoot: fmt.Sprintf("~%c%s", filepath.Separator, "repositories"),
// KeySkipHost: "false",
KeyDefaultHost: "github.com",
KeyOutput: OutTree,
KeyReposRoot: fmt.Sprintf("~%c%s", filepath.Separator, "repositories"),
KeyDefaultScheme: "ssh",
}
// Values for the --out flag.