leo
cf61dd4795
All checks were successful
continuous-integration/drone/push Build is passing
to prevent defer-after-exit, rework the way run() is done: * make run return an error * return nil if all went well * return err if something went south special-case ErrNoAlgoSelected in main(). adjust run_test.go to these new realities, also.
20 lines
254 B
Go
20 lines
254 B
Go
// Copyright 2023 wanderer <a_mirre at utb dot cz>
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
package main
|
|
|
|
import (
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
err := run()
|
|
if err != nil {
|
|
if err.Error() == "ErrNoAlgoSelected" {
|
|
return
|
|
}
|
|
|
|
log.Fatal(err)
|
|
}
|
|
}
|