in oneCRLDiffCCADB/main.go [31:58]
func inspect(norm []*normalized.Normalized) (Return, error) {
ret := NewReturn()
for _, n := range norm {
if n.AddedAndPresent() {
ret.AddedAndPresentInOneCRL = append(ret.AddedAndPresentInOneCRL, n)
} else if n.ExpiredAndPresent() {
ret.ExpiredAndPresentInOneCRL = append(ret.ExpiredAndPresentInOneCRL, n)
} else if n.ReadyAndPresent() {
ret.ReadyToAddAndPresentInOneCRL = append(ret.ReadyToAddAndPresentInOneCRL, n)
} else if n.AbsentAndPresent() {
ret.AbsentFromCCADBAndPresentInOneCRL = append(ret.AbsentFromCCADBAndPresentInOneCRL, n)
} else if n.AddedAndAbsent() {
ret.AddedAndAbsentFromOneCRL = append(ret.AddedAndAbsentFromOneCRL, n)
} else if n.ExpiredAndAbsent() {
ret.ExpiredAndAbsentFromOneCRL = append(ret.ExpiredAndAbsentFromOneCRL, n)
} else if n.ReadyAndAbsent() {
ret.ReadyToAddAndAbsentFromOneCRL = append(ret.ReadyToAddAndAbsentFromOneCRL, n)
} else if n.NoRevocationStatus() {
ret.NoRevocationStatus = append(ret.NoRevocationStatus, n)
} else if n.AbsentAndAbsent() {
// Logically dead code? Almost certainly, but...
ret.AbsentFromCCADBAndAbsentFromOneCRL = append(ret.AbsentFromCCADBAndAbsentFromOneCRL, n)
} else {
// return ret, errors.New("encountered a case that was unaccounted for during inspection")
}
}
return ret, nil
}