We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e9c41d3 commit f48d79bCopy full SHA for f48d79b
1 file changed
main.go
@@ -63,7 +63,11 @@ var (
63
// Set the input to the file contents if a file is given
64
// otherwise, use stdin
65
if len(args) > 0 && args[0] != "-" {
66
- in, err = os.Open(args[0])
+ filename := args[0]
67
+ if !strings.HasSuffix(filename, extension) {
68
+ filename = filename + extension
69
+ }
70
+ in, err = os.Open(filename)
71
if err != nil {
72
return err
73
}
0 commit comments