diff --git a/005-literals/literals.go b/004-literals/literals.go similarity index 100% rename from 005-literals/literals.go rename to 004-literals/literals.go diff --git a/005-literals/literals.sh b/004-literals/literals.sh similarity index 100% rename from 005-literals/literals.sh rename to 004-literals/literals.sh diff --git a/004-mutation/mutation.go b/004-mutation/mutation.go deleted file mode 100644 index e554ba2..0000000 --- a/004-mutation/mutation.go +++ /dev/null @@ -1,16 +0,0 @@ -// ## Mutation - -package main - -import "fmt" - -func main() { - var x string - x = "old" - fmt.Println(x) - - // You can mutate variables in Go by re-assigning the - // variable to a new value. - x = "new" - fmt.Println(x) -} diff --git a/004-mutation/mutation.sh b/004-mutation/mutation.sh deleted file mode 100644 index 97fa82e..0000000 --- a/004-mutation/mutation.sh +++ /dev/null @@ -1,3 +0,0 @@ -$ go run mutation.go -old -new diff --git a/006-constants/constants.go b/005-constants/constants.go similarity index 100% rename from 006-constants/constants.go rename to 005-constants/constants.go diff --git a/006-constants/constants.sh b/005-constants/constants.sh similarity index 100% rename from 006-constants/constants.sh rename to 005-constants/constants.sh diff --git a/007-for/for.go b/006-for/for.go similarity index 100% rename from 007-for/for.go rename to 006-for/for.go diff --git a/007-for/for.sh b/006-for/for.sh similarity index 100% rename from 007-for/for.sh rename to 006-for/for.sh diff --git a/008-if-else/if-else.go b/007-if-else/if-else.go similarity index 100% rename from 008-if-else/if-else.go rename to 007-if-else/if-else.go diff --git a/008-if-else/if-else.sh b/007-if-else/if-else.sh similarity index 100% rename from 008-if-else/if-else.sh rename to 007-if-else/if-else.sh diff --git a/009-case/case.go b/008-case/case.go similarity index 100% rename from 009-case/case.go rename to 008-case/case.go diff --git a/009-case/case.sh b/008-case/case.sh similarity index 100% rename from 009-case/case.sh rename to 008-case/case.sh diff --git a/010-arrays/arrays.go b/009-arrays/arrays.go similarity index 100% rename from 010-arrays/arrays.go rename to 009-arrays/arrays.go diff --git a/012-range/range.go b/010-range/range.go similarity index 100% rename from 012-range/range.go rename to 010-range/range.go diff --git a/014-slices/slices.go b/011-slices/slices.go similarity index 100% rename from 014-slices/slices.go rename to 011-slices/slices.go diff --git a/011-sum/sum.go b/011-sum/sum.go deleted file mode 100644 index 60affa0..0000000 --- a/011-sum/sum.go +++ /dev/null @@ -1,20 +0,0 @@ -// ## Sum - -package main - -import "fmt" - -func main() { - var x [5]float64 - x[0] = 98 - x[1] = 93 - x[2] = 77 - x[3] = 82 - x[4] = 83 - - var total float64 = 0 - for i := 0; i < 5; i++ { - total += x[i] - } - fmt.Println(total / float64(len(x))) -} diff --git a/015-maps/maps.go b/012-maps/maps.go similarity index 100% rename from 015-maps/maps.go rename to 012-maps/maps.go diff --git a/013-floats/floats.go b/013-floats/floats.go deleted file mode 100644 index edbe2d6..0000000 --- a/013-floats/floats.go +++ /dev/null @@ -1,14 +0,0 @@ -// ## Floats - -package main - -import "fmt" - -func main() { - x := [5]float64{ 98, 93, 77, 82, 83 } - total := 0.0 - for _, v := range x { - total += v - } - fmt.Println(total / float64(len(x))) -} diff --git a/016-nesting/nesting.go b/013-nesting/nesting.go similarity index 100% rename from 016-nesting/nesting.go rename to 013-nesting/nesting.go diff --git a/017-functions/functions.go b/014-functions/functions.go similarity index 100% rename from 017-functions/functions.go rename to 014-functions/functions.go diff --git a/018-returns/returns.go b/015-returns/returns.go similarity index 100% rename from 018-returns/returns.go rename to 015-returns/returns.go diff --git a/018-returns/returns.sh b/015-returns/returns.sh similarity index 100% rename from 018-returns/returns.sh rename to 015-returns/returns.sh diff --git a/019-varadic/varadic.go b/016-varadic/varadic.go similarity index 100% rename from 019-varadic/varadic.go rename to 016-varadic/varadic.go diff --git a/019-varadic/varadic.sh b/016-varadic/varadic.sh similarity index 100% rename from 019-varadic/varadic.sh rename to 016-varadic/varadic.sh diff --git a/020-closures/closures.go b/017-closures/closures.go similarity index 100% rename from 020-closures/closures.go rename to 017-closures/closures.go diff --git a/021-recursion/recursion.go b/018-recursion/recursion.go similarity index 100% rename from 021-recursion/recursion.go rename to 018-recursion/recursion.go diff --git a/022-defer/defer.go b/019-defer/defer.go similarity index 100% rename from 022-defer/defer.go rename to 019-defer/defer.go diff --git a/023-panic/panic.go b/020-panic/panic.go similarity index 100% rename from 023-panic/panic.go rename to 020-panic/panic.go diff --git a/023-panic/panic.sh b/020-panic/panic.sh similarity index 100% rename from 023-panic/panic.sh rename to 020-panic/panic.sh diff --git a/024-recover/recover.go b/021-recover/recover.go similarity index 100% rename from 024-recover/recover.go rename to 021-recover/recover.go diff --git a/025-pointers/pointers.go b/022-pointers/pointers.go similarity index 100% rename from 025-pointers/pointers.go rename to 022-pointers/pointers.go diff --git a/026-new/new.go b/023-new/new.go similarity index 100% rename from 026-new/new.go rename to 023-new/new.go diff --git a/027-structs/structs.go b/024-structs/structs.go similarity index 100% rename from 027-structs/structs.go rename to 024-structs/structs.go diff --git a/028-fields/fields.go b/025-fields/fields.go similarity index 100% rename from 028-fields/fields.go rename to 025-fields/fields.go diff --git a/029-methods/methods.go b/026-methods/methods.go similarity index 100% rename from 029-methods/methods.go rename to 026-methods/methods.go diff --git a/030-embedding/embedding.go b/027-embedding/embedding.go similarity index 100% rename from 030-embedding/embedding.go rename to 027-embedding/embedding.go diff --git a/031-interfaces/interfaces.go b/028-interfaces/interfaces.go similarity index 100% rename from 031-interfaces/interfaces.go rename to 028-interfaces/interfaces.go diff --git a/032-ok-guards/ok-guards.go b/029-ok-guards/ok-guards.go similarity index 100% rename from 032-ok-guards/ok-guards.go rename to 029-ok-guards/ok-guards.go diff --git a/033-errors/errors.go b/030-errors/errors.go similarity index 100% rename from 033-errors/errors.go rename to 030-errors/errors.go diff --git a/034-goroutines/goroutines.go b/031-goroutines/goroutines.go similarity index 100% rename from 034-goroutines/goroutines.go rename to 031-goroutines/goroutines.go diff --git a/035-concurrent-goroutines/concurrent-goroutines.go b/032-concurrent-goroutines/concurrent-goroutines.go similarity index 100% rename from 035-concurrent-goroutines/concurrent-goroutines.go rename to 032-concurrent-goroutines/concurrent-goroutines.go diff --git a/036-channels/channels.go b/033-channels/channels.go similarity index 100% rename from 036-channels/channels.go rename to 033-channels/channels.go diff --git a/037-channel-buffering/channel-buffering.go b/034-channel-buffering/channel-buffering.go similarity index 100% rename from 037-channel-buffering/channel-buffering.go rename to 034-channel-buffering/channel-buffering.go diff --git a/038-channel-directions/channel-directions.go b/035-channel-directions/channel-directions.go similarity index 100% rename from 038-channel-directions/channel-directions.go rename to 035-channel-directions/channel-directions.go diff --git a/039-synchronization/synchronization.go b/036-synchronization/synchronization.go similarity index 100% rename from 039-synchronization/synchronization.go rename to 036-synchronization/synchronization.go diff --git a/039-synchronization/synchronization.sh b/036-synchronization/synchronization.sh similarity index 100% rename from 039-synchronization/synchronization.sh rename to 036-synchronization/synchronization.sh diff --git a/040-select/select.go b/037-select/select.go similarity index 100% rename from 040-select/select.go rename to 037-select/select.go diff --git a/041-timeouts/timeouts.go b/038-timeouts/timeouts.go similarity index 100% rename from 041-timeouts/timeouts.go rename to 038-timeouts/timeouts.go diff --git a/042-scatter-gather/081-scatter-gather.go b/039-scatter-gather/081-scatter-gather.go similarity index 100% rename from 042-scatter-gather/081-scatter-gather.go rename to 039-scatter-gather/081-scatter-gather.go diff --git a/043-rate-limiting/rate-limiting.go b/040-rate-limiting/rate-limiting.go similarity index 100% rename from 043-rate-limiting/rate-limiting.go rename to 040-rate-limiting/rate-limiting.go diff --git a/044-worker-pools/worker-pools.go b/041-worker-pools/worker-pools.go similarity index 100% rename from 044-worker-pools/worker-pools.go rename to 041-worker-pools/worker-pools.go diff --git a/045-sorting/sorting.go b/042-sorting/sorting.go similarity index 100% rename from 045-sorting/sorting.go rename to 042-sorting/sorting.go diff --git a/045-sorting/sorting.sh b/042-sorting/sorting.sh similarity index 100% rename from 045-sorting/sorting.sh rename to 042-sorting/sorting.sh diff --git a/046-sorting-by-functions/sorting-by-functions.go b/043-sorting-by-functions/sorting-by-functions.go similarity index 100% rename from 046-sorting-by-functions/sorting-by-functions.go rename to 043-sorting-by-functions/sorting-by-functions.go diff --git a/046-sorting-by-functions/sorting-by-functions.sh b/043-sorting-by-functions/sorting-by-functions.sh similarity index 100% rename from 046-sorting-by-functions/sorting-by-functions.sh rename to 043-sorting-by-functions/sorting-by-functions.sh diff --git a/047-string-functions/string-functions.go b/044-string-functions/string-functions.go similarity index 100% rename from 047-string-functions/string-functions.go rename to 044-string-functions/string-functions.go diff --git a/048-string-formatting/string-formatting.go b/045-string-formatting/string-formatting.go similarity index 100% rename from 048-string-formatting/string-formatting.go rename to 045-string-formatting/string-formatting.go diff --git a/048-string-formatting/string-formatting.sh b/045-string-formatting/string-formatting.sh similarity index 100% rename from 048-string-formatting/string-formatting.sh rename to 045-string-formatting/string-formatting.sh diff --git a/049-regexs/regexs.go b/046-regexs/regexs.go similarity index 100% rename from 049-regexs/regexs.go rename to 046-regexs/regexs.go diff --git a/049-regexs/regexs.sh b/046-regexs/regexs.sh similarity index 100% rename from 049-regexs/regexs.sh rename to 046-regexs/regexs.sh diff --git a/050-bytes/bytes.go b/047-bytes/bytes.go similarity index 100% rename from 050-bytes/bytes.go rename to 047-bytes/bytes.go diff --git a/051-json/json.go b/048-json/json.go similarity index 100% rename from 051-json/json.go rename to 048-json/json.go diff --git a/052-time/time.go b/049-time/time.go similarity index 100% rename from 052-time/time.go rename to 049-time/time.go diff --git a/052-time/time.sh b/049-time/time.sh similarity index 100% rename from 052-time/time.sh rename to 049-time/time.sh diff --git a/053-epochs/epochs.go b/050-epochs/epochs.go similarity index 100% rename from 053-epochs/epochs.go rename to 050-epochs/epochs.go diff --git a/053-epochs/epochs.sh b/050-epochs/epochs.sh similarity index 100% rename from 053-epochs/epochs.sh rename to 050-epochs/epochs.sh diff --git a/054-measuring-elapsed-time/measuring-elapsed-time.go b/051-measuring-elapsed-time/measuring-elapsed-time.go similarity index 100% rename from 054-measuring-elapsed-time/measuring-elapsed-time.go rename to 051-measuring-elapsed-time/measuring-elapsed-time.go diff --git a/055-timers/timers.go b/052-timers/timers.go similarity index 100% rename from 055-timers/timers.go rename to 052-timers/timers.go diff --git a/055-timers/tiners.sh b/052-timers/tiners.sh similarity index 100% rename from 055-timers/tiners.sh rename to 052-timers/tiners.sh diff --git a/056-tickers/tickers.go b/053-tickers/tickers.go similarity index 100% rename from 056-tickers/tickers.go rename to 053-tickers/tickers.go diff --git a/056-tickers/tickers.sh b/053-tickers/tickers.sh similarity index 100% rename from 056-tickers/tickers.sh rename to 053-tickers/tickers.sh diff --git a/057-random-numbers/random-numbers.go b/054-random-numbers/random-numbers.go similarity index 100% rename from 057-random-numbers/random-numbers.go rename to 054-random-numbers/random-numbers.go diff --git a/057-random-numbers/random-numbers.sh b/054-random-numbers/random-numbers.sh similarity index 100% rename from 057-random-numbers/random-numbers.sh rename to 054-random-numbers/random-numbers.sh diff --git a/058-number-parsing/number-parsing.go b/055-number-parsing/number-parsing.go similarity index 100% rename from 058-number-parsing/number-parsing.go rename to 055-number-parsing/number-parsing.go diff --git a/058-number-parsing/number-parsing.sh b/055-number-parsing/number-parsing.sh similarity index 100% rename from 058-number-parsing/number-parsing.sh rename to 055-number-parsing/number-parsing.sh diff --git a/060-urls/urls.go b/057-urls/urls.go similarity index 100% rename from 060-urls/urls.go rename to 057-urls/urls.go diff --git a/060-urls/urls.sh b/057-urls/urls.sh similarity index 100% rename from 060-urls/urls.sh rename to 057-urls/urls.sh diff --git a/062-file-open/file-open.go b/059-file-open/file-open.go similarity index 100% rename from 062-file-open/file-open.go rename to 059-file-open/file-open.go diff --git a/063-file-read/file-read.go b/060-file-read/file-read.go similarity index 100% rename from 063-file-read/file-read.go rename to 060-file-read/file-read.go diff --git a/064-file-write/file-write.go b/061-file-write/file-write.go similarity index 100% rename from 064-file-write/file-write.go rename to 061-file-write/file-write.go diff --git a/065-command-line-arguments/command-line-arguments.go b/062-command-line-arguments/command-line-arguments.go similarity index 100% rename from 065-command-line-arguments/command-line-arguments.go rename to 062-command-line-arguments/command-line-arguments.go diff --git a/065-command-line-arguments/command-line-arguments.sh b/062-command-line-arguments/command-line-arguments.sh similarity index 100% rename from 065-command-line-arguments/command-line-arguments.sh rename to 062-command-line-arguments/command-line-arguments.sh diff --git a/066-command-line-flags/command-line-flags.go b/063-command-line-flags/command-line-flags.go similarity index 100% rename from 066-command-line-flags/command-line-flags.go rename to 063-command-line-flags/command-line-flags.go diff --git a/067-env/env.go b/064-env/env.go similarity index 100% rename from 067-env/env.go rename to 064-env/env.go diff --git a/067-env/env.sh b/064-env/env.sh similarity index 100% rename from 067-env/env.sh rename to 064-env/env.sh diff --git a/068-signals/signals.go b/065-signals/signals.go similarity index 100% rename from 068-signals/signals.go rename to 065-signals/signals.go diff --git a/068-signals/signals.sh b/065-signals/signals.sh similarity index 100% rename from 068-signals/signals.sh rename to 065-signals/signals.sh diff --git a/069-exit/exit.go b/066-exit/exit.go similarity index 100% rename from 069-exit/exit.go rename to 066-exit/exit.go diff --git a/069-exit/exit.sh b/066-exit/exit.sh similarity index 100% rename from 069-exit/exit.sh rename to 066-exit/exit.sh diff --git a/070-spawn/spawn.go b/067-spawn/spawn.go similarity index 100% rename from 070-spawn/spawn.go rename to 067-spawn/spawn.go diff --git a/070-spawn/spawn.sh b/067-spawn/spawn.sh similarity index 100% rename from 070-spawn/spawn.sh rename to 067-spawn/spawn.sh diff --git a/071-exec/exec.go b/068-exec/exec.go similarity index 100% rename from 071-exec/exec.go rename to 068-exec/exec.go diff --git a/072-reading-input/reading-input.go b/069-reading-input/reading-input.go similarity index 100% rename from 072-reading-input/reading-input.go rename to 069-reading-input/reading-input.go diff --git a/072-reading-input/reading-input.sh b/069-reading-input/reading-input.sh similarity index 100% rename from 072-reading-input/reading-input.sh rename to 069-reading-input/reading-input.sh diff --git a/073-users/users.go b/070-users/users.go similarity index 100% rename from 073-users/users.go rename to 070-users/users.go diff --git a/073-users/users.sh b/070-users/users.sh similarity index 100% rename from 073-users/users.sh rename to 070-users/users.sh diff --git a/074-line-filter/line-filter.go b/071-line-filter/line-filter.go similarity index 100% rename from 074-line-filter/line-filter.go rename to 071-line-filter/line-filter.go diff --git a/074-line-filter/line-filter.sh b/071-line-filter/line-filter.sh similarity index 100% rename from 074-line-filter/line-filter.sh rename to 071-line-filter/line-filter.sh diff --git a/076-tcp-client/tcp-client.go b/073-tcp-client/tcp-client.go similarity index 100% rename from 076-tcp-client/tcp-client.go rename to 073-tcp-client/tcp-client.go diff --git a/076-tcp-client/tcp-client.sh b/073-tcp-client/tcp-client.sh similarity index 100% rename from 076-tcp-client/tcp-client.sh rename to 073-tcp-client/tcp-client.sh diff --git a/077-http-client/http-client.go b/074-http-client/http-client.go similarity index 100% rename from 077-http-client/http-client.go rename to 074-http-client/http-client.go diff --git a/078-http-client-basic/http-client-basic.go b/075-http-client-basic/http-client-basic.go similarity index 100% rename from 078-http-client-basic/http-client-basic.go rename to 075-http-client-basic/http-client-basic.go diff --git a/079-https-client/https-client.go b/076-https-client/https-client.go similarity index 100% rename from 079-https-client/https-client.go rename to 076-https-client/https-client.go diff --git a/080-redis/redis.go b/077-redis/redis.go similarity index 100% rename from 080-redis/redis.go rename to 077-redis/redis.go diff --git a/080-redis/redis.sh b/077-redis/redis.sh similarity index 100% rename from 080-redis/redis.sh rename to 077-redis/redis.sh diff --git a/081-postgres/postgres.go b/078-postgres/postgres.go similarity index 100% rename from 081-postgres/postgres.go rename to 078-postgres/postgres.go diff --git a/081-postgres/postgres.sh b/078-postgres/postgres.sh similarity index 100% rename from 081-postgres/postgres.sh rename to 078-postgres/postgres.sh diff --git a/082-email/email.go b/079-sending-email/sending-email.go similarity index 95% rename from 082-email/email.go rename to 079-sending-email/sending-email.go index f467edb..94abd29 100644 --- a/082-email/email.go +++ b/079-sending-email/sending-email.go @@ -1,4 +1,4 @@ -// ## Email +// ## Sending Email package main diff --git a/083-http-server-basic/http-server-basic.go b/080-http-server-basic/http-server-basic.go similarity index 100% rename from 083-http-server-basic/http-server-basic.go rename to 080-http-server-basic/http-server-basic.go diff --git a/084-http-server-canonical-host/http-server-canonical-host.go b/081-http-server-canonical-host/http-server-canonical-host.go similarity index 100% rename from 084-http-server-canonical-host/http-server-canonical-host.go rename to 081-http-server-canonical-host/http-server-canonical-host.go diff --git a/084-http-server-canonical-host/http-server-canonical-host.sh b/081-http-server-canonical-host/http-server-canonical-host.sh similarity index 100% rename from 084-http-server-canonical-host/http-server-canonical-host.sh rename to 081-http-server-canonical-host/http-server-canonical-host.sh diff --git a/085-http-server-graceful-shutdown/http-server-graceful-shutdown.go b/082-http-server-graceful-shutdown/http-server-graceful-shutdown.go similarity index 100% rename from 085-http-server-graceful-shutdown/http-server-graceful-shutdown.go rename to 082-http-server-graceful-shutdown/http-server-graceful-shutdown.go diff --git a/085-http-server-graceful-shutdown/http-server-graceful-shutdown.sh b/082-http-server-graceful-shutdown/http-server-graceful-shutdown.sh similarity index 100% rename from 085-http-server-graceful-shutdown/http-server-graceful-shutdown.sh rename to 082-http-server-graceful-shutdown/http-server-graceful-shutdown.sh diff --git a/086-http-server-log/http-server-log.go b/083-http-server-log/http-server-log.go similarity index 100% rename from 086-http-server-log/http-server-log.go rename to 083-http-server-log/http-server-log.go diff --git a/087-http-server-middleware/http-server-middleware.go b/084-http-server-middleware/http-server-middleware.go similarity index 100% rename from 087-http-server-middleware/http-server-middleware.go rename to 084-http-server-middleware/http-server-middleware.go diff --git a/088-http-server-routing/http-server-routing.go b/085-http-server-routing/http-server-routing.go similarity index 100% rename from 088-http-server-routing/http-server-routing.go rename to 085-http-server-routing/http-server-routing.go diff --git a/088-http-server-routing/http-server-routing.sh b/085-http-server-routing/http-server-routing.sh similarity index 100% rename from 088-http-server-routing/http-server-routing.sh rename to 085-http-server-routing/http-server-routing.sh diff --git a/089-http-server-static-dynamic/http-server-static-dynamic.go b/086-http-server-static-dynamic/http-server-static-dynamic.go similarity index 100% rename from 089-http-server-static-dynamic/http-server-static-dynamic.go rename to 086-http-server-static-dynamic/http-server-static-dynamic.go diff --git a/089-http-server-static-dynamic/http-server-static-dynamic.sh b/086-http-server-static-dynamic/http-server-static-dynamic.sh similarity index 100% rename from 089-http-server-static-dynamic/http-server-static-dynamic.sh rename to 086-http-server-static-dynamic/http-server-static-dynamic.sh diff --git a/090-http-server-static-select/http-server-static-select.go b/087-http-server-static-select/http-server-static-select.go similarity index 100% rename from 090-http-server-static-select/http-server-static-select.go rename to 087-http-server-static-select/http-server-static-select.go diff --git a/090-http-server-static-select/http-server-static-select.sh b/087-http-server-static-select/http-server-static-select.sh similarity index 100% rename from 090-http-server-static-select/http-server-static-select.sh rename to 087-http-server-static-select/http-server-static-select.sh diff --git a/091-http-server-static/http-server-static.go b/088-http-server-static/http-server-static.go similarity index 100% rename from 091-http-server-static/http-server-static.go rename to 088-http-server-static/http-server-static.go diff --git a/091-http-server-static/http-server-static.sh b/088-http-server-static/http-server-static.sh similarity index 100% rename from 091-http-server-static/http-server-static.sh rename to 088-http-server-static/http-server-static.sh diff --git a/092-http-server-status-code/http-server-status-code.go b/089-http-server-status-code/http-server-status-code.go similarity index 100% rename from 092-http-server-status-code/http-server-status-code.go rename to 089-http-server-status-code/http-server-status-code.go diff --git a/092-http-server-status-code/http-server-status-code.sh b/089-http-server-status-code/http-server-status-code.sh similarity index 100% rename from 092-http-server-status-code/http-server-status-code.sh rename to 089-http-server-status-code/http-server-status-code.sh diff --git a/093-http-server/http-server.go b/090-http-server/http-server.go similarity index 100% rename from 093-http-server/http-server.go rename to 090-http-server/http-server.go diff --git a/094-https-server/https-server.go b/091-https-server/https-server.go similarity index 100% rename from 094-https-server/https-server.go rename to 091-https-server/https-server.go diff --git a/094-https-server/https-server.sh b/091-https-server/https-server.sh similarity index 100% rename from 094-https-server/https-server.sh rename to 091-https-server/https-server.sh diff --git a/tool/index.txt b/tool/index.txt index fe2b6ca..b09e77b 100644 --- a/tool/index.txt +++ b/tool/index.txt @@ -6,16 +6,13 @@ hello-world values variables -mutation literals constants for if-else case arrays -sum range -floats slices maps nesting @@ -100,7 +97,7 @@ https-client redis postgres ~ mongodb -email +sending-email # web apps http-server-basic