aboutsummaryrefslogtreecommitdiffstats
path: root/src/u_utils.go
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2022-04-04 17:25:56 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2022-04-04 17:25:56 +0200
commitef3b1d89bba80854172eee9e8693f72ad1d768bc (patch)
tree1d29abe56aab93031246505a6b27cb9948291b82 /src/u_utils.go
parentTime update (diff)
downloadgo2work-ef3b1d89bba80854172eee9e8693f72ad1d768bc.tar.gz
go2work-ef3b1d89bba80854172eee9e8693f72ad1d768bc.tar.bz2
go2work-ef3b1d89bba80854172eee9e8693f72ad1d768bc.tar.xz
go2work-ef3b1d89bba80854172eee9e8693f72ad1d768bc.tar.zst
go2work-ef3b1d89bba80854172eee9e8693f72ad1d768bc.zip
Update
Diffstat (limited to 'src/u_utils.go')
-rw-r--r--src/u_utils.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/u_utils.go b/src/u_utils.go
index b93832c..b523f7f 100644
--- a/src/u_utils.go
+++ b/src/u_utils.go
@@ -89,6 +89,10 @@ func get_test_time() [3]byte {
func choose_file(options Options) int {
file_id := len(options.Files)
+ if file_id == 0 {
+ print_no_files()
+ return -1
+ }
if options.Random == true && file_id > 1 {
rand.Seed(time.Now().UnixNano())
file_id = rand.Intn(file_id)