Add run_examples.py script
This commit is contained in:
parent
502db632d5
commit
07edbb9c11
16
scripts/run_examples.py
Executable file
16
scripts/run_examples.py
Executable file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import signal
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from subprocess import call
|
||||
|
||||
if __name__ == '__main__':
|
||||
signal.signal(signal.SIGINT, lambda sig, frame: sys.exit(0))
|
||||
|
||||
p = Path('.') / '_example'
|
||||
files = p.glob('*.go')
|
||||
for file in files:
|
||||
command = f'go run {file}'
|
||||
print(command)
|
||||
call(command.split())
|
Loading…
Reference in New Issue
Block a user