summaryrefslogtreecommitdiff
path: root/doDelete.go
blob: b0ab05eefff8426405cb359a98f0959bf64e2a80 (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
package main

import (
	"go.wit.com/lib/protobuf/gitpb"
	"go.wit.com/log"
)

func Delete(repo *gitpb.Repo, s map[string]string) bool {
	if repo.Published == nil {
		log.Info("published is nil", repo.Published)
	} else {
		log.Info("published len", repo.Published.Len())
	}

	// add a new one here
	newr := gitpb.Repo{
		FullPath:         repo.FullPath,
		GoPath:           repo.GoPath,
		URL:              repo.URL,
		Tags:             repo.Tags,
		LastPull:         repo.LastPull,
		MasterBranchName: repo.MasterBranchName,
		DevelBranchName:  repo.DevelBranchName,
		UserBranchName:   repo.UserBranchName,
		GoLibrary:        repo.GoLibrary,
		GoBinary:         repo.GoBinary,
		GoPrimitive:      repo.GoPrimitive,
		GoPlugin:         repo.GoPlugin,
		GoDeps:           repo.GoDeps,
		LastGoDep:        repo.LastGoDep,
		Dirty:            repo.Dirty,
		Published:        repo.Published,
		TargetVersion:    repo.TargetVersion,
		ReadOnly:         repo.ReadOnly,
		GoProtobuf:       repo.GoProtobuf,
	}
	if argv.Fix {
		me.forge.Repos.AppendUniqueGoPath(&newr)
	}
	return true
}