Skip to content

Commit

Permalink
Added Comment and Uncomment helper scripts
Browse files Browse the repository at this point in the history
These are useful for piping a selection through in order to comment/uncomment
blocks of lines with idiomatic Go style.
  • Loading branch information
driusan committed Nov 24, 2016
1 parent 77b4750 commit 544b866
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions scripts/Comment
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

sed -E 's/^([[:space:]]*)/\1\/\/ /'
2 changes: 1 addition & 1 deletion scripts/Indent
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

sed -e 's/^/\t/'
sed -e 's/^/ /'
3 changes: 3 additions & 0 deletions scripts/Uncomment
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

sed -E 's/^([[:space:]]*)(\/\/ )/\1/'

0 comments on commit 544b866

Please sign in to comment.