summaryrefslogtreecommitdiff
path: root/configDefault.go
blob: 0f505d5302d1d7a6c43c6e2de5c838e5cb7dbf32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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")
}