|
go-tour: move code snippets to article-specific directories
As the prog/tour directory grows it becomes more difficult to see
what belongs where. Also the prog/tour directory hierarchy is one
level too deep.
Here's the code used to make this change:
for article in *.article; do
base=$(echo $article | sed 's/.article//')
mkdir $base
gofiles=$(grep '^.play' $article | awk '{print $2}' | sed 's_prog/tour/__' | sort -u)
for f in $gofiles; do
hg mv prog/tour/$f $base/$f
done
sed -i '' 's_prog/tour_'$base'_' $article
done
# catch dreg masked by "#appengine: " comment directive
hg mv prog/tour/sandbox.go welcome/
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+3 lines, -3 lines) |
Patch |
|
M |
content/basics.article
|
View
|
|
14 chunks |
+14 lines, -14 lines |
0 comments
|
Download
|
|
M |
content/basics/basic-types.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/basics/constants.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/basics/exported-names.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/basics/functions.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/basics/functions-continued.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/basics/imports.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/basics/multiple-results.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/basics/named-results.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/basics/numeric-constants.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/basics/packages.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/basics/short-variable-declarations.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/basics/type-conversions.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/basics/variables.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/basics/variables-with-initializers.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/concurrency.article
|
View
|
|
8 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
|
M |
content/concurrency/buffered-channels.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/concurrency/channels.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/concurrency/default-selection.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/concurrency/exercise-equivalent-binary-trees.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/concurrency/exercise-web-crawler.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/concurrency/goroutines.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/concurrency/range-and-close.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/concurrency/select.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/flowcontrol.article
|
View
|
|
9 chunks |
+14 lines, -14 lines |
0 comments
|
Download
|
|
M |
content/flowcontrol/defer.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/flowcontrol/defer-multi.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/flowcontrol/exercise-loops-and-functions.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/flowcontrol/for.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/flowcontrol/for-continued.go
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
content/flowcontrol/for-is-gos-while.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/flowcontrol/forever.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/flowcontrol/if.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/flowcontrol/if-and-else.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/flowcontrol/if-with-a-short-statement.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/flowcontrol/switch.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/flowcontrol/switch-evaluation-order.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/flowcontrol/switch-with-no-condition.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/methods.article
|
View
|
|
12 chunks |
+12 lines, -12 lines |
0 comments
|
Download
|
|
M |
content/methods/errors.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/methods/exercise-errors.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/methods/exercise-http-handlers.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/methods/exercise-images.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/methods/exercise-rot-reader.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/methods/images.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/methods/interfaces.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/methods/interfaces-are-satisfied-implicitly.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/methods/methods.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/methods/methods-continued.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/methods/methods-with-pointer-receivers.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/methods/web-servers.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/moretypes.article
|
View
|
|
17 chunks |
+22 lines, -22 lines |
0 comments
|
Download
|
|
M |
content/moretypes/append.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/moretypes/array.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/moretypes/exercise-fibonacci-closure.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/moretypes/exercise-maps.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/moretypes/exercise-slices.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/moretypes/function-closures.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/moretypes/function-values.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/moretypes/making-slices.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/moretypes/map-literals.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/moretypes/map-literals-continued.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/moretypes/maps.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/moretypes/mutating-maps.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/moretypes/nil-slices.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/moretypes/pointers.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/moretypes/range.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/moretypes/range-continued.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/moretypes/slices.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/moretypes/slicing-slices.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/moretypes/struct-fields.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/moretypes/struct-literals.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/moretypes/struct-pointers.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/moretypes/structs.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/welcome.article
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
content/welcome/hello.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
content/welcome/sandbox.go
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
Total messages: 4
|