forgepb/configDefault.go

64 lines
1.4 KiB
Go
Raw Normal View History

2024-11-20 10:31:25 -06:00
package forgepb
import (
"fmt"
"go.wit.com/log"
)
2024-11-30 01:31:54 -06:00
func (all *ForgeConfigs) sampleConfig() {
new1 := new(ForgeConfig)
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(ForgeConfig)
2024-11-20 21:22:05 -06:00
new1.GoPath = "go.wit.com/apps/zookeeper"
2024-11-22 11:14:55 -06:00
new1.DebName = "zookeeper-go"
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(ForgeConfig)
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(ForgeConfig)
2024-11-20 21:22:05 -06:00
new1.GoPath = "go.wit.com/apps/networkQuality"
2024-11-22 11:14:55 -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(ForgeConfig)
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.ForgeConfigs), "repos")
2024-11-20 10:31:25 -06:00
}