Skip to content

Commit 0533981

Browse files
authored
fix: index out of range (#4)
when decodes from STDIN Signed-off-by: Dwi Siswanto <git@dw1.io>
1 parent df1a310 commit 0533981

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ func main() {
2222
}
2323

2424
switch {
25+
case len(args) <= 0:
26+
showErr(ErrNoOp)
2527
case opts.Decode:
2628
output, err = opts.decode(args[0])
2729
case opts.Lorem:

0 commit comments

Comments
 (0)