2024-11-20 10:31:25 -06:00
|
|
|
package forgepb
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"go.wit.com/log"
|
|
|
|
)
|
|
|
|
|
|
|
|
func (all *Repos) SampleConfig() {
|
|
|
|
new1 := new(Repo)
|
2024-11-20 21:22:05 -06:00
|
|
|
new1.GoPath = "go.wit.com"
|
|
|
|
new1.Writable = true
|
|
|
|
new1.Directory = true
|
2024-11-20 10:31:25 -06:00
|
|
|
if all.Append(new1) {
|
2024-11-20 21:22:05 -06:00
|
|
|
log.Info("added", new1.GoPath, "ok")
|
2024-11-20 10:31:25 -06:00
|
|
|
} else {
|
2024-11-20 21:22:05 -06:00
|
|
|
log.Info("added", new1.GoPath, "failed")
|
2024-11-20 10:31:25 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
new1 = new(Repo)
|
2024-11-20 21:22:05 -06:00
|
|
|
new1.GoPath = "go.wit.com/apps/zookeeper"
|
2024-11-20 10:31:25 -06:00
|
|
|
new1.Debname = "zookeeper-go"
|
|
|
|
if all.Append(new1) {
|
2024-11-20 21:22:05 -06:00
|
|
|
log.Info("added", new1.GoPath, "ok")
|
2024-11-20 10:31:25 -06:00
|
|
|
} else {
|
2024-11-20 21:22:05 -06:00
|
|
|
log.Info("added", new1.GoPath, "failed")
|
2024-11-20 10:31:25 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
new1 = new(Repo)
|
2024-11-20 21:22:05 -06:00
|
|
|
new1.GoPath = "go.wit.com/apps/wit-package"
|
2024-11-20 10:31:25 -06:00
|
|
|
new1.Private = true
|
|
|
|
if all.Append(new1) {
|
2024-11-20 21:22:05 -06:00
|
|
|
log.Info("added", new1.GoPath, "ok")
|
2024-11-20 10:31:25 -06:00
|
|
|
} else {
|
2024-11-20 21:22:05 -06:00
|
|
|
log.Info("added", new1.GoPath, "failed")
|
2024-11-20 10:31:25 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
new1 = new(Repo)
|
2024-11-20 21:22:05 -06:00
|
|
|
new1.GoPath = "go.wit.com/apps/networkQuality"
|
2024-11-20 10:31:25 -06:00
|
|
|
new1.Debname = "networkquality"
|
2024-11-20 21:22:05 -06:00
|
|
|
new1.ReadOnly = true
|
2024-11-20 10:31:25 -06:00
|
|
|
if all.Append(new1) {
|
2024-11-20 21:22:05 -06:00
|
|
|
log.Info("added", new1.GoPath, "ok")
|
2024-11-20 10:31:25 -06:00
|
|
|
} else {
|
2024-11-20 21:22:05 -06:00
|
|
|
log.Info("added", new1.GoPath, "failed")
|
2024-11-20 10:31:25 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
new2 := new(Repo)
|
2024-11-20 21:22:05 -06:00
|
|
|
new2.GoPath = "go.wit.com/apps/go-clone"
|
2024-11-20 10:31:25 -06:00
|
|
|
if all.Append(new2) {
|
2024-11-20 21:22:05 -06:00
|
|
|
log.Info("added", new2.GoPath, "ok")
|
2024-11-20 10:31:25 -06:00
|
|
|
} else {
|
2024-11-20 21:22:05 -06:00
|
|
|
log.Info("added", new2.GoPath, "failed")
|
2024-11-20 10:31:25 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
if all.Append(new2) {
|
2024-11-20 21:22:05 -06:00
|
|
|
log.Info("added", new2.GoPath, "ok (this is bad)")
|
2024-11-20 10:31:25 -06:00
|
|
|
} else {
|
2024-11-20 21:22:05 -06:00
|
|
|
log.Info("added", new2.GoPath, "failed (but ok)")
|
2024-11-20 10:31:25 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fmt.Println("first time user. adding an example config file with", len(all.Repos), "repos")
|
|
|
|
}
|