diff options
| author | Jeff Carr <[email protected]> | 2024-11-30 01:31:54 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-11-30 01:31:54 -0600 |
| commit | d972937cca56565ed4b7f53f708530992f98646b (patch) | |
| tree | 21455c80f53ec7b0a044b25a1c6f1672d6d7903d /configDefault.go | |
| parent | 09d9c36f76f4810087bc0acfa9854d61bfd3db86 (diff) | |
move Clone() herev0.0.8
Diffstat (limited to 'configDefault.go')
| -rw-r--r-- | configDefault.go | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/configDefault.go b/configDefault.go new file mode 100644 index 0000000..0f505d5 --- /dev/null +++ b/configDefault.go @@ -0,0 +1,63 @@ +package forgepb + +import ( + "fmt" + + "go.wit.com/log" +) + +func (all *ForgeConfigs) sampleConfig() { + new1 := new(ForgeConfig) + new1.GoPath = "go.wit.com" + new1.Writable = true + new1.Directory = true + if all.Append(new1) { + log.Info("added", new1.GoPath, "ok") + } else { + log.Info("added", new1.GoPath, "failed") + } + + new1 = new(ForgeConfig) + new1.GoPath = "go.wit.com/apps/zookeeper" + new1.DebName = "zookeeper-go" + if all.Append(new1) { + log.Info("added", new1.GoPath, "ok") + } else { + log.Info("added", new1.GoPath, "failed") + } + + new1 = new(ForgeConfig) + new1.GoPath = "go.wit.com/apps/wit-package" + new1.Private = true + if all.Append(new1) { + log.Info("added", new1.GoPath, "ok") + } else { + log.Info("added", new1.GoPath, "failed") + } + + new1 = new(ForgeConfig) + new1.GoPath = "go.wit.com/apps/networkQuality" + new1.DebName = "networkquality" + new1.ReadOnly = true + if all.Append(new1) { + log.Info("added", new1.GoPath, "ok") + } else { + log.Info("added", new1.GoPath, "failed") + } + + new2 := new(ForgeConfig) + new2.GoPath = "go.wit.com/apps/go-clone" + if all.Append(new2) { + log.Info("added", new2.GoPath, "ok") + } else { + log.Info("added", new2.GoPath, "failed") + } + + if all.Append(new2) { + log.Info("added", new2.GoPath, "ok (this is bad)") + } else { + log.Info("added", new2.GoPath, "failed (but ok)") + } + + fmt.Println("first time user. adding an example config file with", len(all.ForgeConfigs), "repos") +} |
