diff options
| author | Jeff Carr <[email protected]> | 2024-11-20 10:31:25 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-11-20 10:31:25 -0600 |
| commit | 39a8d9e13ecb9619418bd15dba5ef3ecf4e2d9f9 (patch) | |
| tree | b516483849e974eb8fdb1ae9421f892ebccc98d6 /sampleConfig.go | |
| parent | 35a2db858f1635f947c2b5f9bbfe9bb64ef7a472 (diff) | |
config files are cool!
Diffstat (limited to 'sampleConfig.go')
| -rw-r--r-- | sampleConfig.go | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/sampleConfig.go b/sampleConfig.go new file mode 100644 index 0000000..b849468 --- /dev/null +++ b/sampleConfig.go @@ -0,0 +1,63 @@ +package forgepb + +import ( + "fmt" + + "go.wit.com/log" +) + +func (all *Repos) SampleConfig() { + new1 := new(Repo) + new1.Name = "bash" + new1.Version = "5.2.21" + if all.Append(new1) { + log.Info("added", new1.Name, "ok") + } else { + log.Info("added", new1.Name, "failed") + } + + new1 = new(Repo) + new1.Name = "zookeeper" + new1.Debname = "zookeeper-go" + if all.Append(new1) { + log.Info("added", new1.Name, "ok") + } else { + log.Info("added", new1.Name, "failed") + } + + new1 = new(Repo) + new1.Name = "wit-package" + new1.Private = true + if all.Append(new1) { + log.Info("added", new1.Name, "ok") + } else { + log.Info("added", new1.Name, "failed") + } + + new1 = new(Repo) + new1.Name = "networkQuality" + new1.Debname = "networkquality" + new1.Readonly = true + if all.Append(new1) { + log.Info("added", new1.Name, "ok") + } else { + log.Info("added", new1.Name, "failed") + } + + new2 := new(Repo) + new2.Name = "go-clone" + new2.Version = "0.6.8" // good version of the macos + if all.Append(new2) { + log.Info("added", new2.Name, "ok") + } else { + log.Info("added", new2.Name, "failed") + } + + if all.Append(new2) { + log.Info("added", new2.Name, "ok (this is bad)") + } else { + log.Info("added", new2.Name, "failed (but ok)") + } + + fmt.Println("first time user. adding an example config file with", len(all.Repos), "repos") +} |
