add error case for dist operations

This commit is contained in:
NunoSempere 2024-09-15 16:36:51 -04:00
parent b01337378a
commit 98814edb62

View File

@ -171,6 +171,9 @@ func operateDistsAsSamples(dist1 Dist, dist2 Dist, op string) (Dist, error) {
zs[i] = xs[i] + ys[i]
case "-":
zs[i] = xs[i] - ys[i]
default:
fmt.Println("Error: Operation not recognized")
return nil, errors.New("Operation not recognized")
}
}