Open coip opened 5 years ago
https://github.com/sicoyle/txstcs/blob/7857e21f4ce9268784813ea84eecc3349122fefc/projectEuler/Problem_001.go#L11
one approach might be: sed -i 's/1000/os.Args[len(os.Args)-1]/' Problem_001.go should do the trick, though you will also need to add "os" to your imports.
sed -i 's/1000/os.Args[len(os.Args)-1]/' Problem_001.go
"os"
*for multi-ref imports, use the format:
import ( "fmt" "os" )
could also use "pkg/flag", which would bake-in default values. for the os.Args approach you'll have to handle the NaN-err/default-val cases.
"pkg/flag"
os.Args
NaN-err
default-val
https://github.com/sicoyle/txstcs/blob/7857e21f4ce9268784813ea84eecc3349122fefc/projectEuler/Problem_001.go#L11
one approach might be:
sed -i 's/1000/os.Args[len(os.Args)-1]/' Problem_001.go
should do the trick, though you will also need to add"os"
to your imports.*for multi-ref imports, use the format: