summaryrefslogtreecommitdiff
path: root/common.go
blob: 6065b8c5638f4c459f30653bb4e0c4bb8c6388f1 (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
package gitpb

import "go.wit.com/log"

func (repo *Repo) SetReadOnly(b bool) {
	repo.ReadOnly = b
}

func (repo *Repo) SetTargetVersion(target string) {
	repo.TargetVersion = target
}

func (repo *Repo) SetMasterBranchName(s string) {
	log.Info("gitpb.SetMaster() SET MASTER TO", s)
	repo.MasterBranchName = s
}

func (repo *Repo) GetGoPath() string {
	if repo.GoInfo == nil {
		return ""
	}
	return repo.GoInfo.GoPath
}

func (repo *Repo) GetGoPrimitive() bool {
	if repo.GoInfo == nil {
		return false
	}
	return repo.GoInfo.GoPrimitive
}

func (repo *Repo) SetGoPrimitive(b bool) {
	if repo.GoInfo == nil {
		repo.GoInfo = new(GoInfo)
	}
	repo.GoInfo.GoPrimitive = b
}