1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-11-19 08:16:06 +00:00
Files
thefuck/thefuck/rules/go_run.py
2015-06-02 12:05:47 +08:00

15 lines
316 B
Python

# Appends .go when compiling go files
#
# Example:
# > go run foo
# error: go run: no go files listed
#
#
def match(command, settings):
return (command.script.startswith ('go run ')
and not command.script.endswith('.go'))
def get_new_command(command, settings):
return command.script + '.go'