optimize: remove redundant returns
MODIFY
optimize/lbfgs.go
optimize/lbfgs.go
@@ -70,7 +70,6 @@ func (l *LBFGS) Init(dim, tasks int) int {
func (l *LBFGS) Run(operation chan<- Task, result <-chan Task, tasks []Task) {
l.status, l.err = localOptimizer{}.run(l, l.GradStopThreshold, operation, result, tasks)
close(operation)
- return
}
func (l *LBFGS) initLocal(loc *Location) (Operation, error) {

MODIFY
optimize/neldermead.go
optimize/neldermead.go
@@ -105,7 +105,6 @@ func (n *NelderMead) Init(dim, tasks int) int {
func (n *NelderMead) Run(operation chan<- Task, result <-chan Task, tasks []Task) {
n.status, n.err = localOptimizer{}.run(n, math.NaN(), operation, result, tasks)
close(operation)
- return
}
func (n *NelderMead) initLocal(loc *Location) (Operation, error) {

MODIFY
optimize/newton.go
optimize/newton.go
@@ -82,7 +82,6 @@ func (n *Newton) Init(dim, tasks int) int {
func (n *Newton) Run(operation chan<- Task, result <-chan Task, tasks []Task) {
n.status, n.err = localOptimizer{}.run(n, n.GradStopThreshold, operation, result, tasks)
close(operation)
- return
}
func (n *Newton) initLocal(loc *Location) (Operation, error) {

optimize: remove redundant returns