add error case for dist operations
This commit is contained in:
parent
b01337378a
commit
98814edb62
3
fermi.go
3
fermi.go
|
@ -171,6 +171,9 @@ func operateDistsAsSamples(dist1 Dist, dist2 Dist, op string) (Dist, error) {
|
||||||
zs[i] = xs[i] + ys[i]
|
zs[i] = xs[i] + ys[i]
|
||||||
case "-":
|
case "-":
|
||||||
zs[i] = xs[i] - ys[i]
|
zs[i] = xs[i] - ys[i]
|
||||||
|
default:
|
||||||
|
fmt.Println("Error: Operation not recognized")
|
||||||
|
return nil, errors.New("Operation not recognized")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user