diff --git a/066-line-filter/line-filter.go b/058-line-filter/line-filter.go similarity index 100% rename from 066-line-filter/line-filter.go rename to 058-line-filter/line-filter.go diff --git a/066-line-filter/line-filter.sh b/058-line-filter/line-filter.sh similarity index 100% rename from 066-line-filter/line-filter.sh rename to 058-line-filter/line-filter.sh diff --git a/058-command-line-arguments/command-line-arguments.go b/059-command-line-arguments/command-line-arguments.go similarity index 100% rename from 058-command-line-arguments/command-line-arguments.go rename to 059-command-line-arguments/command-line-arguments.go diff --git a/058-command-line-arguments/command-line-arguments.sh b/059-command-line-arguments/command-line-arguments.sh similarity index 100% rename from 058-command-line-arguments/command-line-arguments.sh rename to 059-command-line-arguments/command-line-arguments.sh diff --git a/059-command-line-flags/command-line-flags.go b/060-command-line-flags/command-line-flags.go similarity index 100% rename from 059-command-line-flags/command-line-flags.go rename to 060-command-line-flags/command-line-flags.go diff --git a/060-environment-variables/environment-variables.go b/061-environment-variables/environment-variables.go similarity index 100% rename from 060-environment-variables/environment-variables.go rename to 061-environment-variables/environment-variables.go diff --git a/060-environment-variables/environment-variables.sh b/061-environment-variables/environment-variables.sh similarity index 100% rename from 060-environment-variables/environment-variables.sh rename to 061-environment-variables/environment-variables.sh diff --git a/061-spawning-processes/spawning-processes.go b/062-spawning-processes/spawning-processes.go similarity index 100% rename from 061-spawning-processes/spawning-processes.go rename to 062-spawning-processes/spawning-processes.go diff --git a/061-spawning-processes/spawning-processes.sh b/062-spawning-processes/spawning-processes.sh similarity index 100% rename from 061-spawning-processes/spawning-processes.sh rename to 062-spawning-processes/spawning-processes.sh diff --git a/062-execing-processes/execing-processes.go b/063-execing-processes/execing-processes.go similarity index 100% rename from 062-execing-processes/execing-processes.go rename to 063-execing-processes/execing-processes.go diff --git a/063-signals/signals.go b/064-signals/signals.go similarity index 100% rename from 063-signals/signals.go rename to 064-signals/signals.go diff --git a/063-signals/signals.sh b/064-signals/signals.sh similarity index 100% rename from 063-signals/signals.sh rename to 064-signals/signals.sh diff --git a/064-exit/exit.go b/065-exit/exit.go similarity index 100% rename from 064-exit/exit.go rename to 065-exit/exit.go diff --git a/064-exit/exit.sh b/065-exit/exit.sh similarity index 100% rename from 064-exit/exit.sh rename to 065-exit/exit.sh diff --git a/065-reading-input/reading-input.go b/065-reading-input/reading-input.go deleted file mode 100644 index bd179e6..0000000 --- a/065-reading-input/reading-input.go +++ /dev/null @@ -1,13 +0,0 @@ -// ## Reading Input - -package main - -import "fmt" - -func main() { - fmt.Print("Enter a number: ") - var input float64 - fmt.Scanf("%f", &input) - output := input * 2 - fmt.Println(input, "* 2 =", output) -} diff --git a/065-reading-input/reading-input.sh b/065-reading-input/reading-input.sh deleted file mode 100644 index f95b609..0000000 --- a/065-reading-input/reading-input.sh +++ /dev/null @@ -1,3 +0,0 @@ -$ go run reading-input.go -Enter a number: 7 -7 * 2 = 14 diff --git a/068-tcp-client/tcp-client.go b/066-tcp-client/tcp-client.go similarity index 100% rename from 068-tcp-client/tcp-client.go rename to 066-tcp-client/tcp-client.go diff --git a/068-tcp-client/tcp-client.sh b/066-tcp-client/tcp-client.sh similarity index 100% rename from 068-tcp-client/tcp-client.sh rename to 066-tcp-client/tcp-client.sh diff --git a/069-http-client/http-client.go b/067-http-client/http-client.go similarity index 100% rename from 069-http-client/http-client.go rename to 067-http-client/http-client.go diff --git a/070-http-client-basic/http-client-basic.go b/068-http-client-basic/http-client-basic.go similarity index 100% rename from 070-http-client-basic/http-client-basic.go rename to 068-http-client-basic/http-client-basic.go diff --git a/071-https-client/https-client.go b/069-https-client/https-client.go similarity index 100% rename from 071-https-client/https-client.go rename to 069-https-client/https-client.go diff --git a/072-redis/redis.go b/070-redis/redis.go similarity index 100% rename from 072-redis/redis.go rename to 070-redis/redis.go diff --git a/072-redis/redis.sh b/070-redis/redis.sh similarity index 100% rename from 072-redis/redis.sh rename to 070-redis/redis.sh diff --git a/073-postgres/postgres.go b/071-postgres/postgres.go similarity index 100% rename from 073-postgres/postgres.go rename to 071-postgres/postgres.go diff --git a/073-postgres/postgres.sh b/071-postgres/postgres.sh similarity index 100% rename from 073-postgres/postgres.sh rename to 071-postgres/postgres.sh diff --git a/074-sending-email/sending-email.go b/072-sending-email/sending-email.go similarity index 100% rename from 074-sending-email/sending-email.go rename to 072-sending-email/sending-email.go diff --git a/075-http-server-basic/http-server-basic.go b/073-http-server-basic/http-server-basic.go similarity index 100% rename from 075-http-server-basic/http-server-basic.go rename to 073-http-server-basic/http-server-basic.go diff --git a/076-http-server-canonical-host/http-server-canonical-host.go b/074-http-server-canonical-host/http-server-canonical-host.go similarity index 100% rename from 076-http-server-canonical-host/http-server-canonical-host.go rename to 074-http-server-canonical-host/http-server-canonical-host.go diff --git a/076-http-server-canonical-host/http-server-canonical-host.sh b/074-http-server-canonical-host/http-server-canonical-host.sh similarity index 100% rename from 076-http-server-canonical-host/http-server-canonical-host.sh rename to 074-http-server-canonical-host/http-server-canonical-host.sh diff --git a/077-http-server-graceful-shutdown/http-server-graceful-shutdown.go b/075-http-server-graceful-shutdown/http-server-graceful-shutdown.go similarity index 100% rename from 077-http-server-graceful-shutdown/http-server-graceful-shutdown.go rename to 075-http-server-graceful-shutdown/http-server-graceful-shutdown.go diff --git a/077-http-server-graceful-shutdown/http-server-graceful-shutdown.sh b/075-http-server-graceful-shutdown/http-server-graceful-shutdown.sh similarity index 100% rename from 077-http-server-graceful-shutdown/http-server-graceful-shutdown.sh rename to 075-http-server-graceful-shutdown/http-server-graceful-shutdown.sh diff --git a/078-http-server-log/http-server-log.go b/076-http-server-log/http-server-log.go similarity index 100% rename from 078-http-server-log/http-server-log.go rename to 076-http-server-log/http-server-log.go diff --git a/079-http-server-middleware/http-server-middleware.go b/077-http-server-middleware/http-server-middleware.go similarity index 100% rename from 079-http-server-middleware/http-server-middleware.go rename to 077-http-server-middleware/http-server-middleware.go diff --git a/080-http-server-routing/http-server-routing.go b/078-http-server-routing/http-server-routing.go similarity index 100% rename from 080-http-server-routing/http-server-routing.go rename to 078-http-server-routing/http-server-routing.go diff --git a/080-http-server-routing/http-server-routing.sh b/078-http-server-routing/http-server-routing.sh similarity index 100% rename from 080-http-server-routing/http-server-routing.sh rename to 078-http-server-routing/http-server-routing.sh diff --git a/081-http-server-static-dynamic/http-server-static-dynamic.go b/079-http-server-static-dynamic/http-server-static-dynamic.go similarity index 100% rename from 081-http-server-static-dynamic/http-server-static-dynamic.go rename to 079-http-server-static-dynamic/http-server-static-dynamic.go diff --git a/081-http-server-static-dynamic/http-server-static-dynamic.sh b/079-http-server-static-dynamic/http-server-static-dynamic.sh similarity index 100% rename from 081-http-server-static-dynamic/http-server-static-dynamic.sh rename to 079-http-server-static-dynamic/http-server-static-dynamic.sh diff --git a/082-http-server-static-select/http-server-static-select.go b/080-http-server-static-select/http-server-static-select.go similarity index 100% rename from 082-http-server-static-select/http-server-static-select.go rename to 080-http-server-static-select/http-server-static-select.go diff --git a/082-http-server-static-select/http-server-static-select.sh b/080-http-server-static-select/http-server-static-select.sh similarity index 100% rename from 082-http-server-static-select/http-server-static-select.sh rename to 080-http-server-static-select/http-server-static-select.sh diff --git a/083-http-server-static/http-server-static.go b/081-http-server-static/http-server-static.go similarity index 100% rename from 083-http-server-static/http-server-static.go rename to 081-http-server-static/http-server-static.go diff --git a/083-http-server-static/http-server-static.sh b/081-http-server-static/http-server-static.sh similarity index 100% rename from 083-http-server-static/http-server-static.sh rename to 081-http-server-static/http-server-static.sh diff --git a/084-http-server-status-code/http-server-status-code.go b/082-http-server-status-code/http-server-status-code.go similarity index 100% rename from 084-http-server-status-code/http-server-status-code.go rename to 082-http-server-status-code/http-server-status-code.go diff --git a/084-http-server-status-code/http-server-status-code.sh b/082-http-server-status-code/http-server-status-code.sh similarity index 100% rename from 084-http-server-status-code/http-server-status-code.sh rename to 082-http-server-status-code/http-server-status-code.sh diff --git a/085-http-server/http-server.go b/083-http-server/http-server.go similarity index 100% rename from 085-http-server/http-server.go rename to 083-http-server/http-server.go diff --git a/083-tcp-server/tcp-server.go b/083-tcp-server/tcp-server.go deleted file mode 100644 index 5abda6e..0000000 --- a/083-tcp-server/tcp-server.go +++ /dev/null @@ -1,26 +0,0 @@ -// ## TCP Server - -package main - -import "net" - -func main() { - listener, _ := net.Listen("tcp", "0.0.0.0:5000") - for { - conn, _ := listener.Accept() - go Serve(conn) - } -} - -func Serve(conn net.Conn) { - buf := make([]byte, 1024) - for { - _, err := conn.Read(buf) - if err != nil { - conn.Close() - return - } else { - conn.Write(buf) - } - } -} diff --git a/083-tcp-server/tcp-server.sh b/083-tcp-server/tcp-server.sh deleted file mode 100644 index d7cbd1d..0000000 --- a/083-tcp-server/tcp-server.sh +++ /dev/null @@ -1 +0,0 @@ -$ go run tcp-server.go diff --git a/086-https-server/https-server.go b/084-https-server/https-server.go similarity index 100% rename from 086-https-server/https-server.go rename to 084-https-server/https-server.go diff --git a/086-https-server/https-server.sh b/084-https-server/https-server.sh similarity index 100% rename from 086-https-server/https-server.sh rename to 084-https-server/https-server.sh diff --git a/tool/index.txt b/tool/index.txt index b041c23..289343c 100644 --- a/tool/index.txt +++ b/tool/index.txt @@ -69,10 +69,11 @@ urls sha1-hashes ~ base64-encoding -# systems programming +# systems libraries reading-files writing-files ~ standard-streams +line-filter command-line-arguments command-line-flags environment-variables @@ -80,9 +81,6 @@ spawning-processes execing-processes signals exit -reading-input -line-filter -tcp server # client libraries tcp-client