Skip to content

Commit

Permalink
fix: use code for all files if a single one was given
Browse files Browse the repository at this point in the history
  • Loading branch information
Adventune committed Jan 11, 2024
1 parent 9aaaa64 commit 09fcbdd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/executable/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,14 @@ func main() {
}

if len(files) > len(codes) {
log.Fatal("Number of codes is less than number of files")
if len(codes) == 1 {
// If only one code is given, then it is a single code for all files
for i := 0; i < len(files)-1; i++ {
codes = append(codes, codes[0])
}
} else {
log.Fatal("Number of codes is less than number of files")
}
}

// Result arrays
Expand Down

0 comments on commit 09fcbdd

Please sign in to comment.