cleanup old code
This commit is contained in:
parent
cfb5a7adc0
commit
425cb042b9
|
@ -20,7 +20,7 @@ func (all *Repos) ConfigSave() error {
|
||||||
}
|
}
|
||||||
if all == nil {
|
if all == nil {
|
||||||
log.Warn("gitpb all == nil")
|
log.Warn("gitpb all == nil")
|
||||||
panic("why is this nil?")
|
return errors.New("gitpb.ConfigSave() all == nil")
|
||||||
}
|
}
|
||||||
|
|
||||||
data, err := all.Marshal()
|
data, err := all.Marshal()
|
||||||
|
|
|
@ -92,28 +92,8 @@ func (repo *Repo) parseGoSum() (bool, error) {
|
||||||
repo.GoDeps = new(GoDeps)
|
repo.GoDeps = new(GoDeps)
|
||||||
}
|
}
|
||||||
repo.GoDeps.AppendUniqueGoPath(&new1)
|
repo.GoDeps.AppendUniqueGoPath(&new1)
|
||||||
/*
|
|
||||||
found := repo.FindGoDepByPath(godep)
|
|
||||||
if found == nil {
|
|
||||||
currentversion, ok := deps[godep]
|
|
||||||
if ok {
|
|
||||||
// only use the first value found in the file?
|
|
||||||
// this shouldn't have been possible. this function should
|
|
||||||
// only be called from MakeRedomod()
|
|
||||||
// todo: make go things a seperate package so this function
|
|
||||||
// isn't exported?
|
|
||||||
if version != currentversion {
|
|
||||||
log.Warn("\tgo.sum ", godep, "had both", version, currentversion)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
deps[godep] = version
|
|
||||||
log.Info("\t", godep, "=", version)
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
} else {
|
} else {
|
||||||
// I've never seen this happen yet
|
return false, errors.New("go.sum parse error invalid: " + line)
|
||||||
panic(errors.New("go.sum invalid: " + line))
|
|
||||||
// return false, errors.New("go.sum invalid: " + line)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -190,28 +170,8 @@ func (repo *Repo) UpdatePublished() (bool, error) {
|
||||||
repo.Published = new(GoDeps)
|
repo.Published = new(GoDeps)
|
||||||
}
|
}
|
||||||
repo.Published.AppendUniqueGoPath(&new1)
|
repo.Published.AppendUniqueGoPath(&new1)
|
||||||
/*
|
|
||||||
found := repo.FindGoDepByPath(godep)
|
|
||||||
if found == nil {
|
|
||||||
currentversion, ok := deps[godep]
|
|
||||||
if ok {
|
|
||||||
// only use the first value found in the file?
|
|
||||||
// this shouldn't have been possible. this function should
|
|
||||||
// only be called from MakeRedomod()
|
|
||||||
// todo: make go things a seperate package so this function
|
|
||||||
// isn't exported?
|
|
||||||
if version != currentversion {
|
|
||||||
log.Warn("\tgo.sum ", godep, "had both", version, currentversion)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
deps[godep] = version
|
|
||||||
log.Info("\t", godep, "=", version)
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
} else {
|
} else {
|
||||||
// I've never seen this happen yet
|
return false, errors.New("go.sum parse error invalid: " + line)
|
||||||
panic(errors.New("go.sum invalid: " + line))
|
|
||||||
// return false, errors.New("go.sum invalid: " + line)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
shell.go
2
shell.go
|
@ -55,7 +55,7 @@ func (repo *Repo) strictRun(cmd []string) (bool, error) {
|
||||||
func (repo *Repo) Exists(filename string) bool {
|
func (repo *Repo) Exists(filename string) bool {
|
||||||
if repo == nil {
|
if repo == nil {
|
||||||
log.Warn("repo == nil for Exists()")
|
log.Warn("repo == nil for Exists()")
|
||||||
panic(-1)
|
return false
|
||||||
}
|
}
|
||||||
testf := filepath.Join(repo.FullPath, filename)
|
testf := filepath.Join(repo.FullPath, filename)
|
||||||
_, err := os.Stat(testf)
|
_, err := os.Stat(testf)
|
||||||
|
|
Loading…
Reference in New Issue