From 92eb8bc049b0e9849d2eceb40c3cfefedf7dfbda Mon Sep 17 00:00:00 2001 From: Angelika Tyborska Date: Mon, 5 Jul 2021 22:17:48 +0200 Subject: [PATCH] Rename concept exercises (#1464) * Rename booleans -> annalyns_infiltration * Add lasagna blurb * Rename comments -> weather forecast * Rename conditionals -> blackjack * Rename constants -> savings-account * Renamee errors -> deep-thought * Fix depe-thought's blurb * Rename maps -> gross-store * Fix chessboard's prerequisites * Rename structs -> need-for-speed * Rename methods -> elons-toys * Fix some package names to follow conventions Co-authored-by: Eric Kingery * Fix remaining package names with underscores * Rename numbers -> car-factory * Fix gross-store config * Put active concept exercises in "beta" * Rename slices -> card-tricks * Rename strings -> party-robot * Rename strings-package -> logs-logs-logs * Rename time -> booking-up-for-beauty * Rename zero-values -> zero, zilch, nada * Fix booking-up-for-beauty config * Fix booking_up_for_beauty forked from * Rename car-factory -> cars-asemble * Update exercises/concept/cars-assemble/.docs/introduction.md Co-authored-by: Eric Kingery * Update exercises/concept/cars-assemble/.meta/design.md Co-authored-by: Eric Kingery Co-authored-by: Eric Kingery --- concepts/strings-package/introduction.md | 3 - config.json | 286 +++++++++++++++++- .../.docs/hints.md | 0 .../.docs/instructions.md | 0 .../.docs/introduction.md | 0 .../annalyns-infiltration/.meta/config.json | 20 ++ .../.meta/design.md | 0 .../.meta/exemplar.go | 2 +- .../annalyns_infiltration.go} | 2 +- .../annalyns_infiltration_test.go} | 2 +- .../.docs/hints.md | 0 .../.docs/instructions.md | 0 .../.docs/introduction.md | 12 +- .../.meta/config.json | 6 +- .../.meta/design.md | 4 +- .../.meta/exemplar.go | 2 +- .../blackjack.go} | 2 +- .../blackjack_test.go} | 2 +- exercises/concept/blackjack/go.mod | 3 + .../.docs/hints.md | 0 .../.docs/instructions.md | 0 .../.docs/introduction.md | 0 .../booking-up-for-beauty/.meta/config.json | 20 ++ .../.meta/design.md | 1 - .../.meta/exemplar.go | 2 +- .../booking_up_for_beauty.go} | 2 +- .../booking_up_for_beauty_test.go} | 2 +- .../concept/booking-up-for-beauty/go.mod | 3 + exercises/concept/booleans/.meta/config.json | 20 -- .../{slices => card-tricks}/.docs/hints.md | 0 .../.docs/instructions.md | 0 .../.docs/introduction.md | 0 .../.meta/config.json | 6 +- .../{slices => card-tricks}/.meta/design.md | 7 +- .../{slices => card-tricks}/.meta/exemplar.go | 0 .../slices.go => card-tricks/card_tricks.go} | 2 +- .../card_tricks_test.go} | 2 +- exercises/concept/card-tricks/go.mod | 3 + .../{numbers => cars-assemble}/.docs/hints.md | 0 .../.docs/instructions.md | 0 .../.docs/introduction.md | 4 +- .../.meta/config.json | 6 +- .../.meta/design.md | 5 + .../.meta/exemplar.go | 4 +- .../cars_assemble.go} | 2 +- .../cars_assemble_test.go} | 2 +- exercises/concept/cars-assemble/go.mod | 3 + .../concept/chessboard/.meta/config.json | 4 +- exercises/concept/chessboard/.meta/design.md | 9 +- exercises/concept/conditionals/go.mod | 3 - exercises/concept/constants/go.mod | 3 - .../{errors => deep-thought}/.docs/hints.md | 0 .../.docs/instructions.md | 6 +- .../.docs/introduction.md | 0 .../concept/deep-thought/.meta/config.json | 17 ++ .../{errors => deep-thought}/.meta/design.md | 5 +- .../.meta/exemplar.go | 0 .../concept/deep-thought/deep_thought.go | 1 + .../deep_thought_test.go} | 0 .../{methods => elons-toys}/.docs/hints.md | 0 .../.docs/instructions.md | 2 +- .../.docs/introduction.md | 0 .../{methods => elons-toys}/.meta/config.json | 8 +- .../{methods => elons-toys}/.meta/design.md | 1 - .../{methods => elons-toys}/.meta/exemplar.go | 2 +- .../methods.go => elons-toys/elons_toys.go} | 2 +- .../elons_toys_test.go} | 2 +- .../concept/{methods => elons-toys}/go.mod | 2 +- exercises/concept/errors/.meta/config.json | 17 -- exercises/concept/errors/errors.go | 0 .../{maps => gross-store}/.docs/hints.md | 0 .../.docs/instructions.md | 0 .../.docs/introduction.md | 0 .../{maps => gross-store}/.meta/config.json | 6 +- .../{maps => gross-store}/.meta/design.md | 4 +- .../{maps => gross-store}/.meta/exemplar.go | 4 +- exercises/concept/gross-store/go.mod | 3 + .../maps.go => gross-store/gross_store.go} | 4 +- .../gross_store_test.go} | 2 +- exercises/concept/lasagna/.meta/config.json | 2 +- .../.docs/hints.md | 0 .../.docs/instructions.md | 0 .../.docs/introduction.md | 2 - .../.meta/config.json | 6 +- .../.meta/design.md | 2 +- .../.meta/exemplar.go | 0 exercises/concept/logs-logs-logs/go.mod | 3 + .../strings.go => logs-logs-logs/logs.go} | 2 +- .../logs_test.go} | 2 +- exercises/concept/maps/go.mod | 3 - .../.docs/hints.md | 0 .../.docs/instructions.md | 0 .../.docs/introduction.md | 0 .../.meta/config.json | 8 +- .../.meta/design.md | 2 +- .../.meta/exemplar.go | 2 +- .../need_for_speed.go} | 4 +- .../need_for_speed_test.go} | 14 +- exercises/concept/numbers/go.mod | 3 - .../{strings => party-robot}/.docs/hints.md | 0 .../.docs/instructions.md | 0 .../.docs/introduction.md | 0 .../.meta/config.json | 6 +- .../{strings => party-robot}/.meta/design.md | 0 .../.meta/exemplar.go | 2 +- .../concept/{strings => party-robot}/go.mod | 0 .../strings.go => party-robot/party_robot.go} | 2 +- .../party_robot_test.go} | 2 +- .../.docs/hints.md | 0 .../.docs/instructions.md | 0 .../.docs/introduction.md | 0 .../.meta/config.json | 6 +- .../.meta/design.md | 3 +- .../.meta/exemplar.go | 2 +- exercises/concept/savings-account/go.mod | 3 + .../savings_account.go} | 2 +- .../savings_account_test.go} | 2 +- exercises/concept/slices/go.mod | 3 - exercises/concept/strings-package/go.mod | 3 - exercises/concept/time/.meta/config.json | 20 -- exercises/concept/time/go.mod | 3 - .../.docs/hints.md | 0 .../.docs/instructions.md | 0 .../.docs/introduction.md | 0 .../.meta/config.json | 6 +- .../.meta/design.md | 0 .../.meta/exemplar.go | 0 .../weather.go} | 0 .../weather_test.go} | 0 exercises/concept/zero-value/go.mod | 3 - .../.docs/hints.md | 0 .../.docs/instructions.md | 0 .../.docs/introduction.md | 0 .../.meta/config.json | 6 +- .../.meta/design.md | 2 +- .../.meta/exemplar.go | 2 +- exercises/concept/zero-zilch-nada/go.mod | 3 + .../zero_zilch_nada.go} | 2 +- .../zero_zilch_nada_test.go} | 2 +- reference/implementing-a-concept-exercise.md | 4 +- 140 files changed, 485 insertions(+), 208 deletions(-) rename exercises/concept/{booleans => annalyns-infiltration}/.docs/hints.md (100%) rename exercises/concept/{booleans => annalyns-infiltration}/.docs/instructions.md (100%) rename exercises/concept/{booleans => annalyns-infiltration}/.docs/introduction.md (100%) create mode 100644 exercises/concept/annalyns-infiltration/.meta/config.json rename exercises/concept/{booleans => annalyns-infiltration}/.meta/design.md (100%) rename exercises/concept/{booleans => annalyns-infiltration}/.meta/exemplar.go (98%) rename exercises/concept/{booleans/booleans.go => annalyns-infiltration/annalyns_infiltration.go} (98%) rename exercises/concept/{booleans/booleans_test.go => annalyns-infiltration/annalyns_infiltration_test.go} (99%) rename exercises/concept/{conditionals => blackjack}/.docs/hints.md (100%) rename exercises/concept/{conditionals => blackjack}/.docs/instructions.md (100%) rename exercises/concept/{conditionals => blackjack}/.docs/introduction.md (82%) rename exercises/concept/{conditionals => blackjack}/.meta/config.json (66%) rename exercises/concept/{conditionals => blackjack}/.meta/design.md (96%) rename exercises/concept/{conditionals => blackjack}/.meta/exemplar.go (98%) rename exercises/concept/{conditionals/conditionals.go => blackjack/blackjack.go} (98%) rename exercises/concept/{conditionals/conditionals_test.go => blackjack/blackjack_test.go} (99%) create mode 100644 exercises/concept/blackjack/go.mod rename exercises/concept/{time => booking-up-for-beauty}/.docs/hints.md (100%) rename exercises/concept/{time => booking-up-for-beauty}/.docs/instructions.md (100%) rename exercises/concept/{time => booking-up-for-beauty}/.docs/introduction.md (100%) create mode 100644 exercises/concept/booking-up-for-beauty/.meta/config.json rename exercises/concept/{time => booking-up-for-beauty}/.meta/design.md (96%) rename exercises/concept/{time => booking-up-for-beauty}/.meta/exemplar.go (98%) rename exercises/concept/{time/time.go => booking-up-for-beauty/booking_up_for_beauty.go} (98%) rename exercises/concept/{time/time_test.go => booking-up-for-beauty/booking_up_for_beauty_test.go} (99%) create mode 100644 exercises/concept/booking-up-for-beauty/go.mod delete mode 100644 exercises/concept/booleans/.meta/config.json rename exercises/concept/{slices => card-tricks}/.docs/hints.md (100%) rename exercises/concept/{slices => card-tricks}/.docs/instructions.md (100%) rename exercises/concept/{slices => card-tricks}/.docs/introduction.md (100%) rename exercises/concept/{strings-package => card-tricks}/.meta/config.json (59%) rename exercises/concept/{slices => card-tricks}/.meta/design.md (74%) rename exercises/concept/{slices => card-tricks}/.meta/exemplar.go (100%) rename exercises/concept/{slices/slices.go => card-tricks/card_tricks.go} (98%) rename exercises/concept/{slices/slices_test.go => card-tricks/card_tricks_test.go} (99%) create mode 100644 exercises/concept/card-tricks/go.mod rename exercises/concept/{numbers => cars-assemble}/.docs/hints.md (100%) rename exercises/concept/{numbers => cars-assemble}/.docs/instructions.md (100%) rename exercises/concept/{numbers => cars-assemble}/.docs/introduction.md (94%) rename exercises/concept/{numbers => cars-assemble}/.meta/config.json (55%) rename exercises/concept/{numbers => cars-assemble}/.meta/design.md (90%) rename exercises/concept/{numbers => cars-assemble}/.meta/exemplar.go (92%) rename exercises/concept/{numbers/numbers.go => cars-assemble/cars_assemble.go} (97%) rename exercises/concept/{numbers/numbers_test.go => cars-assemble/cars_assemble_test.go} (98%) create mode 100644 exercises/concept/cars-assemble/go.mod delete mode 100644 exercises/concept/conditionals/go.mod delete mode 100644 exercises/concept/constants/go.mod rename exercises/concept/{errors => deep-thought}/.docs/hints.md (100%) rename exercises/concept/{errors => deep-thought}/.docs/instructions.md (66%) rename exercises/concept/{errors => deep-thought}/.docs/introduction.md (100%) create mode 100644 exercises/concept/deep-thought/.meta/config.json rename exercises/concept/{errors => deep-thought}/.meta/design.md (94%) rename exercises/concept/{errors => deep-thought}/.meta/exemplar.go (100%) create mode 100644 exercises/concept/deep-thought/deep_thought.go rename exercises/concept/{comments/comments_test.go => deep-thought/deep_thought_test.go} (100%) rename exercises/concept/{methods => elons-toys}/.docs/hints.md (100%) rename exercises/concept/{methods => elons-toys}/.docs/instructions.md (97%) rename exercises/concept/{methods => elons-toys}/.docs/introduction.md (100%) rename exercises/concept/{methods => elons-toys}/.meta/config.json (61%) rename exercises/concept/{methods => elons-toys}/.meta/design.md (96%) rename exercises/concept/{methods => elons-toys}/.meta/exemplar.go (98%) rename exercises/concept/{methods/methods.go => elons-toys/elons_toys.go} (98%) rename exercises/concept/{methods/methods_test.go => elons-toys/elons_toys_test.go} (99%) rename exercises/concept/{methods => elons-toys}/go.mod (76%) delete mode 100644 exercises/concept/errors/.meta/config.json delete mode 100644 exercises/concept/errors/errors.go rename exercises/concept/{maps => gross-store}/.docs/hints.md (100%) rename exercises/concept/{maps => gross-store}/.docs/instructions.md (100%) rename exercises/concept/{maps => gross-store}/.docs/introduction.md (100%) rename exercises/concept/{maps => gross-store}/.meta/config.json (54%) rename exercises/concept/{maps => gross-store}/.meta/design.md (93%) rename exercises/concept/{maps => gross-store}/.meta/exemplar.go (94%) create mode 100644 exercises/concept/gross-store/go.mod rename exercises/concept/{maps/maps.go => gross-store/gross_store.go} (92%) rename exercises/concept/{maps/maps_test.go => gross-store/gross_store_test.go} (99%) rename exercises/concept/{strings-package => logs-logs-logs}/.docs/hints.md (100%) rename exercises/concept/{strings-package => logs-logs-logs}/.docs/instructions.md (100%) rename exercises/concept/{strings-package => logs-logs-logs}/.docs/introduction.md (90%) rename exercises/concept/{slices => logs-logs-logs}/.meta/config.json (60%) rename exercises/concept/{strings-package => logs-logs-logs}/.meta/design.md (95%) rename exercises/concept/{strings-package => logs-logs-logs}/.meta/exemplar.go (100%) create mode 100644 exercises/concept/logs-logs-logs/go.mod rename exercises/concept/{strings-package/strings.go => logs-logs-logs/logs.go} (96%) rename exercises/concept/{strings-package/strings_test.go => logs-logs-logs/logs_test.go} (99%) delete mode 100644 exercises/concept/maps/go.mod rename exercises/concept/{structs => need-for-speed}/.docs/hints.md (100%) rename exercises/concept/{structs => need-for-speed}/.docs/instructions.md (100%) rename exercises/concept/{structs => need-for-speed}/.docs/introduction.md (100%) rename exercises/concept/{structs => need-for-speed}/.meta/config.json (58%) rename exercises/concept/{structs => need-for-speed}/.meta/design.md (93%) rename exercises/concept/{structs => need-for-speed}/.meta/exemplar.go (98%) rename exercises/concept/{structs/structs.go => need-for-speed/need_for_speed.go} (92%) rename exercises/concept/{structs/structs_test.go => need-for-speed/need_for_speed_test.go} (95%) delete mode 100644 exercises/concept/numbers/go.mod rename exercises/concept/{strings => party-robot}/.docs/hints.md (100%) rename exercises/concept/{strings => party-robot}/.docs/instructions.md (100%) rename exercises/concept/{strings => party-robot}/.docs/introduction.md (100%) rename exercises/concept/{strings => party-robot}/.meta/config.json (62%) rename exercises/concept/{strings => party-robot}/.meta/design.md (100%) rename exercises/concept/{strings => party-robot}/.meta/exemplar.go (97%) rename exercises/concept/{strings => party-robot}/go.mod (100%) rename exercises/concept/{strings/strings.go => party-robot/party_robot.go} (96%) rename exercises/concept/{strings/strings_test.go => party-robot/party_robot_test.go} (99%) rename exercises/concept/{constants => savings-account}/.docs/hints.md (100%) rename exercises/concept/{constants => savings-account}/.docs/instructions.md (100%) rename exercises/concept/{constants => savings-account}/.docs/introduction.md (100%) rename exercises/concept/{constants => savings-account}/.meta/config.json (55%) rename exercises/concept/{constants => savings-account}/.meta/design.md (98%) rename exercises/concept/{constants => savings-account}/.meta/exemplar.go (98%) create mode 100644 exercises/concept/savings-account/go.mod rename exercises/concept/{constants/constants.go => savings-account/savings_account.go} (98%) rename exercises/concept/{constants/constants_test.go => savings-account/savings_account_test.go} (98%) delete mode 100644 exercises/concept/slices/go.mod delete mode 100644 exercises/concept/strings-package/go.mod delete mode 100644 exercises/concept/time/.meta/config.json delete mode 100644 exercises/concept/time/go.mod rename exercises/concept/{comments => weather-forecast}/.docs/hints.md (100%) rename exercises/concept/{comments => weather-forecast}/.docs/instructions.md (100%) rename exercises/concept/{comments => weather-forecast}/.docs/introduction.md (100%) rename exercises/concept/{comments => weather-forecast}/.meta/config.json (51%) rename exercises/concept/{comments => weather-forecast}/.meta/design.md (100%) rename exercises/concept/{comments => weather-forecast}/.meta/exemplar.go (100%) rename exercises/concept/{comments/comments.go => weather-forecast/weather.go} (100%) rename exercises/concept/{errors/errors_test.go => weather-forecast/weather_test.go} (100%) delete mode 100644 exercises/concept/zero-value/go.mod rename exercises/concept/{zero-value => zero-zilch-nada}/.docs/hints.md (100%) rename exercises/concept/{zero-value => zero-zilch-nada}/.docs/instructions.md (100%) rename exercises/concept/{zero-value => zero-zilch-nada}/.docs/introduction.md (100%) rename exercises/concept/{zero-value => zero-zilch-nada}/.meta/config.json (65%) rename exercises/concept/{zero-value => zero-zilch-nada}/.meta/design.md (97%) rename exercises/concept/{zero-value => zero-zilch-nada}/.meta/exemplar.go (98%) create mode 100644 exercises/concept/zero-zilch-nada/go.mod rename exercises/concept/{zero-value/zero_value.go => zero-zilch-nada/zero_zilch_nada.go} (98%) rename exercises/concept/{zero-value/zero_value_test.go => zero-zilch-nada/zero_zilch_nada_test.go} (99%) diff --git a/concepts/strings-package/introduction.md b/concepts/strings-package/introduction.md index 0517ffcae..c22b1e39a 100644 --- a/concepts/strings-package/introduction.md +++ b/concepts/strings-package/introduction.md @@ -13,6 +13,3 @@ For example, you can get a `byte` at position `i` from a `string` called `s` wit With that said, string types are immutable so operations like s[i] = 'a' are not available and will result in a compilation error. [Strings, bytes, runes and characters in Go](https://blog.golang.org/strings) provides a deep dive into this topic. - -This exercise also introduces _conditionals_. Here is a little intro: -[Go by Example: If/Else](https://gobyexample.com/if-else) diff --git a/config.json b/config.json index b6733c730..03ca1e90b 100644 --- a/config.json +++ b/config.json @@ -43,7 +43,179 @@ "basics" ], "prerequisites": [], - "status": "active" + "status": "beta" + }, + { + "slug": "annalyns-infiltration", + "name": "Annalyn's Infiltration", + "uuid": "8833b0c0-1008-4426-8225-1dc2b4852d52", + "concepts": [ + "booleans" + ], + "prerequisites": [ + "basics" + ], + "status": "beta" + }, + { + "slug": "party-robot", + "name": "Party Robot", + "uuid": "b3594c44-1a68-489d-a446-16369247c84c", + "concepts": [ + "strings" + ], + "prerequisites": [ + "basics" + ], + "status": "beta" + }, + { + "slug": "weather-forecast", + "name": "Weather Forecast", + "uuid": "63415c33-658e-4722-bd81-0b80060aecc9", + "concepts": [ + "comments" + ], + "prerequisites": [ + "basics" + ], + "status": "wip" + }, + { + "slug": "savings-account", + "name": "Savings Account", + "uuid": "13f6b5ab-f4bb-453a-a6a9-50132a1d4885", + "concepts": [ + "constants" + ], + "prerequisites": [ + "basics", + "comments", + "strings" + ], + "status": "beta" + }, + { + "slug": "blackjack", + "name": "Blackjack", + "uuid": "628308fc-34e9-46ae-9661-9e0ebceeef34", + "concepts": [ + "conditionals-if", + "conditionals-switch" + ], + "prerequisites": [ + "booleans", + "strings", + "numbers" + ], + "status": "beta" + }, + { + "slug": "booking-up-for-beauty", + "name": "Booking up for Beauty", + "uuid": "57ae07c8-8d7a-4f16-bd25-81a9646dac39", + "concepts": [ + "time" + ], + "prerequisites": [ + "basics", + "strings", + "numbers" + ], + "status": "beta" + }, + { + "slug": "cars-assemble", + "name": "Cars Assemble", + "uuid": "7ab1692d-b7e8-4f11-9bbd-2b855501e5ce", + "concepts": [ + "numbers", + "type-conversion" + ], + "prerequisites": [ + "constants", + "conditionals-if" + ], + "status": "beta" + }, + { + "slug": "gross-store", + "name": "Gross Store", + "uuid": "fb70cf92-fd2c-453b-896c-21a957cfb093", + "concepts": [ + "maps" + ], + "prerequisites": [ + "basics", + "conditionals-if", + "numbers" + ], + "status": "beta" + }, + { + "name": "Need For Speed", + "slug": "need-for-speed", + "uuid": "b165c8b4-429f-4e9f-b157-a636d22b217f", + "concepts": [ + "structs" + ], + "prerequisites": [ + "conditionals-if", + "numbers" + ], + "status": "beta" + }, + { + "name": "Elon's Toys", + "slug": "elons-toys", + "uuid": "18fb2aa2-9748-481e-a321-6b6844c1deb6", + "concepts": [ + "methods" + ], + "prerequisites": [ + "structs", + "pointers" + ], + "status": "beta" + }, + { + "slug": "deep-thought", + "name": "Deep Thought", + "uuid": "097176e2-5024-44e7-ab86-9bc0ec245347", + "concepts": [ + "errors" + ], + "prerequisites": [ + "constants", + "types" + ], + "status": "wip" + }, + { + "name": "Card Tricks", + "slug": "card-tricks", + "uuid": "154660c2-db8c-4ec1-91f2-6b1275eabbc0", + "concepts": [ + "slices" + ], + "prerequisites": [ + "numbers", + "conditionals-if", + "iteration" + ], + "status": "beta" + }, + { + "name": "Logs, Logs, Logs!", + "slug": "logs-logs-logs", + "uuid": "81230a7c-4e47-4a4d-a004-14eae32ec914", + "concepts": [ + "strings-package" + ], + "prerequisites": [ + "slices" + ], + "status": "beta" }, { "name": "Chessboard", @@ -53,13 +225,25 @@ "range-iteration" ], "prerequisites": [ - "basics", - "conditionals", - "functions", + "conditionals-if", "maps", - "slices" + "slices", + "iteration" + ], + "status": "beta" + }, + { + "name": "Zero, Zilch, Nada", + "slug": "zero-zilch-nada", + "uuid": "fa4735f8-4d8a-4fb1-85ed-9cf03e9f7b7a", + "concepts": [ + "nil", + "zero-values" + ], + "prerequisites": [ + "types" ], - "status": "active" + "status": "beta" } ], "practice": [ @@ -1571,6 +1755,96 @@ "name": "Basics", "slug": "basics", "uuid": "5d2b4677-1850-4ee4-890d-dc55a1654626" + }, + { + "name": "Booleans", + "slug": "booleans", + "uuid": "e3942921-34ec-41eb-a999-a5d85a6623fd" + }, + { + "name": "Comments", + "slug": "comments", + "uuid": "9ee93eab-b413-442c-b7fb-76bf044eea2d" + }, + { + "name": "Conditionals If", + "slug": "conditionals-if", + "uuid": "b3731323-f5bb-4b38-931c-2d734667bf8d" + }, + { + "name": "Conditionals Switch", + "slug": "conditionals-switch", + "uuid": "6a4103e0-e7a9-427e-b1bd-716870580c45" + }, + { + "name": "Constants", + "slug": "constants", + "uuid": "b56f68de-44ef-4bd4-8b14-2c50b2a366dd" + }, + { + "name": "Errors", + "slug": "errors", + "uuid": "a960da78-c940-4725-8069-929f42564cdb" + }, + { + "name": "Iteration", + "slug": "iteration", + "uuid": "e18ca160-bbb8-4cd0-882a-0e67f1e60b47" + }, + { + "name": "Maps", + "slug": "maps", + "uuid": "625aa065-b006-4fc5-b276-28e048376b46" + }, + { + "name": "Methods", + "slug": "methods", + "uuid": "d25c6e6b-c6d4-40ce-80f9-cecbc5a72254" + }, + { + "name": "Nil", + "slug": "nil", + "uuid": "c4d16fac-3e46-41ac-adf8-ce8f3f73f745" + }, + { + "name": "Numbers", + "slug": "numbers", + "uuid": "82cff17e-88cd-4707-a6d7-b5143251f029" + }, + { + "name": "Slices", + "slug": "slices", + "uuid": "23e1c40a-300c-4a44-bc32-f3440a057216" + }, + { + "name": "Strings", + "slug": "strings", + "uuid": "eeae05c6-b751-44a2-b843-517ec7b83ef7" + }, + { + "name": "Strings Package", + "slug": "strings-package", + "uuid": "33708451-a03f-44ce-be05-eaacc1d5793c" + }, + { + "name": "Structs", + "slug": "structs", + "uuid": "5bd431cf-c30d-4f5c-a16d-c62e51720fbd" + }, + { + "name": "Time", + "slug": "time", + "uuid": "4673000c-7822-4252-88c5-723f47d6ad06" + }, + { + "name": "Type Conversion", + "slug": "type-conversion", + "uuid": "4f3d535e-cec8-4303-ac5a-ed91a53bd594" + }, + { + "name": "Zero Values", + "slug": "zero-values", + "uuid": "a50b4ed6-6198-4ab2-8075-3770900db4c9" } ], "key_features": [ diff --git a/exercises/concept/booleans/.docs/hints.md b/exercises/concept/annalyns-infiltration/.docs/hints.md similarity index 100% rename from exercises/concept/booleans/.docs/hints.md rename to exercises/concept/annalyns-infiltration/.docs/hints.md diff --git a/exercises/concept/booleans/.docs/instructions.md b/exercises/concept/annalyns-infiltration/.docs/instructions.md similarity index 100% rename from exercises/concept/booleans/.docs/instructions.md rename to exercises/concept/annalyns-infiltration/.docs/instructions.md diff --git a/exercises/concept/booleans/.docs/introduction.md b/exercises/concept/annalyns-infiltration/.docs/introduction.md similarity index 100% rename from exercises/concept/booleans/.docs/introduction.md rename to exercises/concept/annalyns-infiltration/.docs/introduction.md diff --git a/exercises/concept/annalyns-infiltration/.meta/config.json b/exercises/concept/annalyns-infiltration/.meta/config.json new file mode 100644 index 000000000..4da0219b9 --- /dev/null +++ b/exercises/concept/annalyns-infiltration/.meta/config.json @@ -0,0 +1,20 @@ +{ + "blurb": "Learn about booleans by helping Annalyn free her best friend.", + "authors": [ + "oanaOM" + ], + "forked_from": [ + "csharp/annalyns-infiltration" + ], + "files": { + "solution": [ + "annalyns_infiltration.go" + ], + "test": [ + "annalyns_infiltration_test.go" + ], + "exemplar": [ + ".meta/exemplar.go" + ] + } +} diff --git a/exercises/concept/booleans/.meta/design.md b/exercises/concept/annalyns-infiltration/.meta/design.md similarity index 100% rename from exercises/concept/booleans/.meta/design.md rename to exercises/concept/annalyns-infiltration/.meta/design.md diff --git a/exercises/concept/booleans/.meta/exemplar.go b/exercises/concept/annalyns-infiltration/.meta/exemplar.go similarity index 98% rename from exercises/concept/booleans/.meta/exemplar.go rename to exercises/concept/annalyns-infiltration/.meta/exemplar.go index 1383c8b74..c67ac7ca4 100644 --- a/exercises/concept/booleans/.meta/exemplar.go +++ b/exercises/concept/annalyns-infiltration/.meta/exemplar.go @@ -1,4 +1,4 @@ -package booleans +package annalyn // CanFastAttack can be executed only when the knight is sleeping func CanFastAttack(knightIsAwake bool) bool { diff --git a/exercises/concept/booleans/booleans.go b/exercises/concept/annalyns-infiltration/annalyns_infiltration.go similarity index 98% rename from exercises/concept/booleans/booleans.go rename to exercises/concept/annalyns-infiltration/annalyns_infiltration.go index b22872857..65b38ccb9 100644 --- a/exercises/concept/booleans/booleans.go +++ b/exercises/concept/annalyns-infiltration/annalyns_infiltration.go @@ -1,4 +1,4 @@ -package booleans +package annalyn // CanFastAttack can be executed only when the knight is sleeping func CanFastAttack(knightIsAwake bool) bool { diff --git a/exercises/concept/booleans/booleans_test.go b/exercises/concept/annalyns-infiltration/annalyns_infiltration_test.go similarity index 99% rename from exercises/concept/booleans/booleans_test.go rename to exercises/concept/annalyns-infiltration/annalyns_infiltration_test.go index 1fbd9cffb..3e7677983 100644 --- a/exercises/concept/booleans/booleans_test.go +++ b/exercises/concept/annalyns-infiltration/annalyns_infiltration_test.go @@ -1,4 +1,4 @@ -package booleans +package annalyn import "testing" diff --git a/exercises/concept/conditionals/.docs/hints.md b/exercises/concept/blackjack/.docs/hints.md similarity index 100% rename from exercises/concept/conditionals/.docs/hints.md rename to exercises/concept/blackjack/.docs/hints.md diff --git a/exercises/concept/conditionals/.docs/instructions.md b/exercises/concept/blackjack/.docs/instructions.md similarity index 100% rename from exercises/concept/conditionals/.docs/instructions.md rename to exercises/concept/blackjack/.docs/instructions.md diff --git a/exercises/concept/conditionals/.docs/introduction.md b/exercises/concept/blackjack/.docs/introduction.md similarity index 82% rename from exercises/concept/conditionals/.docs/introduction.md rename to exercises/concept/blackjack/.docs/introduction.md index 01c37a49c..81027481e 100644 --- a/exercises/concept/conditionals/.docs/introduction.md +++ b/exercises/concept/blackjack/.docs/introduction.md @@ -1,14 +1,10 @@ # Introduction -## Conditionals If - -## Conditionals Switch - -## Booleans +Conditionals in Go are similar to conditionals in other languages. The underlying type of any conditional operation is the `bool` type, which can have the value of `true` or `false`. Conditionals are often used as flow control mechanisms to check for various conditions. -Go supports the three logical operators `&&` (AND), `||` (OR), and `!` (NOT). +## Conditionals If -Conditionals in Go are similar to conditionals in other languages. The underlying type of any conditional operation is the `bool` type, which can have the value of `true` or `false`. Conditionals are often used as flow control mechanisms to check for various conditions. For checking a particular case an `if` statement can be used, which executes its code if the underlying condition is `true` like this: +For checking a particular case an `if` statement can be used, which executes its code if the underlying condition is `true` like this: ```go var value string @@ -30,6 +26,8 @@ if value == "val" { } ``` +## Conditionals Switch + Go also provides a `switch` statement for more advanced scenarios. ```go diff --git a/exercises/concept/conditionals/.meta/config.json b/exercises/concept/blackjack/.meta/config.json similarity index 66% rename from exercises/concept/conditionals/.meta/config.json rename to exercises/concept/blackjack/.meta/config.json index a6bb6a2c9..a4ed0c52c 100644 --- a/exercises/concept/conditionals/.meta/config.json +++ b/exercises/concept/blackjack/.meta/config.json @@ -1,5 +1,5 @@ { - "blurb": "TODO: add blurb for conditionals exercise", + "blurb": "Learn about conditionals by playing Blackjack.", "authors": [ "andres-zartab" ], @@ -9,10 +9,10 @@ "forked_from": [], "files": { "solution": [ - "conditionals.go" + "blackjack.go" ], "test": [ - "conditionals_test.go" + "blackjack_test.go" ], "exemplar": [ ".meta/exemplar.go" diff --git a/exercises/concept/conditionals/.meta/design.md b/exercises/concept/blackjack/.meta/design.md similarity index 96% rename from exercises/concept/conditionals/.meta/design.md rename to exercises/concept/blackjack/.meta/design.md index 262c42c14..402720231 100644 --- a/exercises/concept/conditionals/.meta/design.md +++ b/exercises/concept/blackjack/.meta/design.md @@ -19,13 +19,13 @@ The goal of this exercise is to teach the student the basics of the Concept of C ## Concepts -- `booleans` - `conditionals-if` - `conditionals-switch` ## Prerequisites -- `basic-strings` +- `booleans` +- `strings` - `numbers` ## Analyzer diff --git a/exercises/concept/conditionals/.meta/exemplar.go b/exercises/concept/blackjack/.meta/exemplar.go similarity index 98% rename from exercises/concept/conditionals/.meta/exemplar.go rename to exercises/concept/blackjack/.meta/exemplar.go index 6751f2ff7..7d46dec6c 100644 --- a/exercises/concept/conditionals/.meta/exemplar.go +++ b/exercises/concept/blackjack/.meta/exemplar.go @@ -1,4 +1,4 @@ -package _meta +package blackjack // ParseCard returns the integer value of a card following blackjack ruleset. func ParseCard(card string) int { diff --git a/exercises/concept/conditionals/conditionals.go b/exercises/concept/blackjack/blackjack.go similarity index 98% rename from exercises/concept/conditionals/conditionals.go rename to exercises/concept/blackjack/blackjack.go index 79500baf0..308246070 100644 --- a/exercises/concept/conditionals/conditionals.go +++ b/exercises/concept/blackjack/blackjack.go @@ -1,4 +1,4 @@ -package conditionals +package blackjack // ParseCard returns the integer value of a card following blackjack ruleset. func ParseCard(card string) int { diff --git a/exercises/concept/conditionals/conditionals_test.go b/exercises/concept/blackjack/blackjack_test.go similarity index 99% rename from exercises/concept/conditionals/conditionals_test.go rename to exercises/concept/blackjack/blackjack_test.go index 1cbc14735..fc42e806a 100644 --- a/exercises/concept/conditionals/conditionals_test.go +++ b/exercises/concept/blackjack/blackjack_test.go @@ -1,4 +1,4 @@ -package conditionals +package blackjack import "testing" diff --git a/exercises/concept/blackjack/go.mod b/exercises/concept/blackjack/go.mod new file mode 100644 index 000000000..7a34f8f8a --- /dev/null +++ b/exercises/concept/blackjack/go.mod @@ -0,0 +1,3 @@ +module blackjack + +go 1.13 diff --git a/exercises/concept/time/.docs/hints.md b/exercises/concept/booking-up-for-beauty/.docs/hints.md similarity index 100% rename from exercises/concept/time/.docs/hints.md rename to exercises/concept/booking-up-for-beauty/.docs/hints.md diff --git a/exercises/concept/time/.docs/instructions.md b/exercises/concept/booking-up-for-beauty/.docs/instructions.md similarity index 100% rename from exercises/concept/time/.docs/instructions.md rename to exercises/concept/booking-up-for-beauty/.docs/instructions.md diff --git a/exercises/concept/time/.docs/introduction.md b/exercises/concept/booking-up-for-beauty/.docs/introduction.md similarity index 100% rename from exercises/concept/time/.docs/introduction.md rename to exercises/concept/booking-up-for-beauty/.docs/introduction.md diff --git a/exercises/concept/booking-up-for-beauty/.meta/config.json b/exercises/concept/booking-up-for-beauty/.meta/config.json new file mode 100644 index 000000000..5ef262d36 --- /dev/null +++ b/exercises/concept/booking-up-for-beauty/.meta/config.json @@ -0,0 +1,20 @@ +{ + "blurb": "Learn about time by handling appointments in a beauty salon.", + "authors": [ + "jamessouth" + ], + "forked_from": [ + "csharp/booking-up-for-beauty" + ], + "files": { + "solution": [ + "booking_up_for_beauty.go" + ], + "test": [ + "booking_up_for_beauty_test.go" + ], + "exemplar": [ + ".meta/exemplar.go" + ] + } +} diff --git a/exercises/concept/time/.meta/design.md b/exercises/concept/booking-up-for-beauty/.meta/design.md similarity index 96% rename from exercises/concept/time/.meta/design.md rename to exercises/concept/booking-up-for-beauty/.meta/design.md index fec9c84a1..e9b4cd048 100644 --- a/exercises/concept/time/.meta/design.md +++ b/exercises/concept/booking-up-for-beauty/.meta/design.md @@ -26,4 +26,3 @@ The goal of this exercise is to teach the student how to use time in Go. - `basics` - `numbers` - `strings` -- `functions` diff --git a/exercises/concept/time/.meta/exemplar.go b/exercises/concept/booking-up-for-beauty/.meta/exemplar.go similarity index 98% rename from exercises/concept/time/.meta/exemplar.go rename to exercises/concept/booking-up-for-beauty/.meta/exemplar.go index 251838b1a..3bb072a7a 100644 --- a/exercises/concept/time/.meta/exemplar.go +++ b/exercises/concept/booking-up-for-beauty/.meta/exemplar.go @@ -1,4 +1,4 @@ -package _meta +package booking import ( "fmt" diff --git a/exercises/concept/time/time.go b/exercises/concept/booking-up-for-beauty/booking_up_for_beauty.go similarity index 98% rename from exercises/concept/time/time.go rename to exercises/concept/booking-up-for-beauty/booking_up_for_beauty.go index 7a6f9e9f1..08bf50d93 100644 --- a/exercises/concept/time/time.go +++ b/exercises/concept/booking-up-for-beauty/booking_up_for_beauty.go @@ -1,4 +1,4 @@ -package time +package booking import "time" diff --git a/exercises/concept/time/time_test.go b/exercises/concept/booking-up-for-beauty/booking_up_for_beauty_test.go similarity index 99% rename from exercises/concept/time/time_test.go rename to exercises/concept/booking-up-for-beauty/booking_up_for_beauty_test.go index b3ad1db6f..f4679df07 100644 --- a/exercises/concept/time/time_test.go +++ b/exercises/concept/booking-up-for-beauty/booking_up_for_beauty_test.go @@ -1,4 +1,4 @@ -package time +package booking import ( "testing" diff --git a/exercises/concept/booking-up-for-beauty/go.mod b/exercises/concept/booking-up-for-beauty/go.mod new file mode 100644 index 000000000..734d40ee7 --- /dev/null +++ b/exercises/concept/booking-up-for-beauty/go.mod @@ -0,0 +1,3 @@ +module booking + +go 1.14 diff --git a/exercises/concept/booleans/.meta/config.json b/exercises/concept/booleans/.meta/config.json deleted file mode 100644 index 92b1216ff..000000000 --- a/exercises/concept/booleans/.meta/config.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "blurb": "TODO: add blurb for booleans exercise", - "authors": [ - "oanaOM" - ], - "forked_from": [ - "csharp/booleans" - ], - "files": { - "solution": [ - "booleans.go" - ], - "test": [ - "booleans_test.go" - ], - "exemplar": [ - ".meta/exemplar.go" - ] - } -} diff --git a/exercises/concept/slices/.docs/hints.md b/exercises/concept/card-tricks/.docs/hints.md similarity index 100% rename from exercises/concept/slices/.docs/hints.md rename to exercises/concept/card-tricks/.docs/hints.md diff --git a/exercises/concept/slices/.docs/instructions.md b/exercises/concept/card-tricks/.docs/instructions.md similarity index 100% rename from exercises/concept/slices/.docs/instructions.md rename to exercises/concept/card-tricks/.docs/instructions.md diff --git a/exercises/concept/slices/.docs/introduction.md b/exercises/concept/card-tricks/.docs/introduction.md similarity index 100% rename from exercises/concept/slices/.docs/introduction.md rename to exercises/concept/card-tricks/.docs/introduction.md diff --git a/exercises/concept/strings-package/.meta/config.json b/exercises/concept/card-tricks/.meta/config.json similarity index 59% rename from exercises/concept/strings-package/.meta/config.json rename to exercises/concept/card-tricks/.meta/config.json index 123c0318f..e6c4ba245 100644 --- a/exercises/concept/strings-package/.meta/config.json +++ b/exercises/concept/card-tricks/.meta/config.json @@ -1,14 +1,14 @@ { - "blurb": "TODO: add blurb for strings-package exercise", + "blurb": "Learn about slices by doing card tricks.", "authors": [ "tehsphinx" ], "files": { "solution": [ - "strings.go" + "card_tricks.go" ], "test": [ - "strings_test.go" + "card_tricks_test.go" ], "exemplar": [ ".meta/exemplar.go" diff --git a/exercises/concept/slices/.meta/design.md b/exercises/concept/card-tricks/.meta/design.md similarity index 74% rename from exercises/concept/slices/.meta/design.md rename to exercises/concept/card-tricks/.meta/design.md index 197721731..c8c9fd670 100644 --- a/exercises/concept/slices/.meta/design.md +++ b/exercises/concept/card-tricks/.meta/design.md @@ -26,10 +26,9 @@ The goal of this exercise is to teach the student the basics on how to work with ## Prerequisites -- iteration: fill a slice (Not yet available: `range iteration`) -- numbers: integers (uint8 and int) to represent cards -- functions: multiple return values, early return, parameters -- conditionals: mostly to check for existing indexes +- `iteration`: fill a slice (Not yet available: `range iteration`) +- `numbers`: integers (uint8 and int) to represent cards +- `conditionals-if`: mostly to check for existing indexes ## Implementing diff --git a/exercises/concept/slices/.meta/exemplar.go b/exercises/concept/card-tricks/.meta/exemplar.go similarity index 100% rename from exercises/concept/slices/.meta/exemplar.go rename to exercises/concept/card-tricks/.meta/exemplar.go diff --git a/exercises/concept/slices/slices.go b/exercises/concept/card-tricks/card_tricks.go similarity index 98% rename from exercises/concept/slices/slices.go rename to exercises/concept/card-tricks/card_tricks.go index 85994e287..0f669d0fa 100644 --- a/exercises/concept/slices/slices.go +++ b/exercises/concept/card-tricks/card_tricks.go @@ -1,4 +1,4 @@ -package slices +package cards // GetItem retrieves an item from a slice at given position. The second return value indicates whether // a the given index existed in the slice or not. diff --git a/exercises/concept/slices/slices_test.go b/exercises/concept/card-tricks/card_tricks_test.go similarity index 99% rename from exercises/concept/slices/slices_test.go rename to exercises/concept/card-tricks/card_tricks_test.go index d6e38beae..6d2013051 100644 --- a/exercises/concept/slices/slices_test.go +++ b/exercises/concept/card-tricks/card_tricks_test.go @@ -1,4 +1,4 @@ -package slices +package cards import ( "reflect" diff --git a/exercises/concept/card-tricks/go.mod b/exercises/concept/card-tricks/go.mod new file mode 100644 index 000000000..fcbb12fe2 --- /dev/null +++ b/exercises/concept/card-tricks/go.mod @@ -0,0 +1,3 @@ +module cards + +go 1.13 diff --git a/exercises/concept/numbers/.docs/hints.md b/exercises/concept/cars-assemble/.docs/hints.md similarity index 100% rename from exercises/concept/numbers/.docs/hints.md rename to exercises/concept/cars-assemble/.docs/hints.md diff --git a/exercises/concept/numbers/.docs/instructions.md b/exercises/concept/cars-assemble/.docs/instructions.md similarity index 100% rename from exercises/concept/numbers/.docs/instructions.md rename to exercises/concept/cars-assemble/.docs/instructions.md diff --git a/exercises/concept/numbers/.docs/introduction.md b/exercises/concept/cars-assemble/.docs/introduction.md similarity index 94% rename from exercises/concept/numbers/.docs/introduction.md rename to exercises/concept/cars-assemble/.docs/introduction.md index df0176ec9..9d0ec7226 100644 --- a/exercises/concept/numbers/.docs/introduction.md +++ b/exercises/concept/cars-assemble/.docs/introduction.md @@ -3,7 +3,7 @@ ## Numbers Go contains basic numeric types that can represent sets of either integer or -floating-point values. There a different types depending on the size of value +floating-point values. There are different types depending on the size of value you require and the architecture of the computer where the application is running (e.g. 32-bit and 64-bit). @@ -28,6 +28,8 @@ following resources: Go supports the standard set of arithmetic operators of `+`, `-`, `*`, `/` and `%` (remainder not modulo). +## Type Conversion + In Go, assignment of a value between different types requires explicit conversion. For example, to convert an `int` to a `float64` you would need to do the following: diff --git a/exercises/concept/numbers/.meta/config.json b/exercises/concept/cars-assemble/.meta/config.json similarity index 55% rename from exercises/concept/numbers/.meta/config.json rename to exercises/concept/cars-assemble/.meta/config.json index f38a7403c..29cf468ed 100644 --- a/exercises/concept/numbers/.meta/config.json +++ b/exercises/concept/cars-assemble/.meta/config.json @@ -1,5 +1,5 @@ { - "blurb": "TODO: add blurb for numbers exercise", + "blurb": "Learn about numbers and type conversion by analyzing an assembly line in a car factory.", "authors": [ "DavyJ0nes" ], @@ -8,10 +8,10 @@ ], "files": { "solution": [ - "numbers.go" + "car_factory.go" ], "test": [ - "numbers_test.go" + "car_factory_test.go" ], "exemplar": [ ".meta/exemplar.go" diff --git a/exercises/concept/numbers/.meta/design.md b/exercises/concept/cars-assemble/.meta/design.md similarity index 90% rename from exercises/concept/numbers/.meta/design.md rename to exercises/concept/cars-assemble/.meta/design.md index ec611d37b..acea5ae59 100644 --- a/exercises/concept/numbers/.meta/design.md +++ b/exercises/concept/cars-assemble/.meta/design.md @@ -16,3 +16,8 @@ My suggestion is to copy C# `numbers` exercise: https://github.com/exercism/v3/t - `numbers` - `type-conversion` + +## Prerequisites + +- `constants` +- `conditionals-if` diff --git a/exercises/concept/numbers/.meta/exemplar.go b/exercises/concept/cars-assemble/.meta/exemplar.go similarity index 92% rename from exercises/concept/numbers/.meta/exemplar.go rename to exercises/concept/cars-assemble/.meta/exemplar.go index 6aa2da0fd..94ca102cb 100644 --- a/exercises/concept/numbers/.meta/exemplar.go +++ b/exercises/concept/cars-assemble/.meta/exemplar.go @@ -1,4 +1,4 @@ -package _meta +package cars // CalculateProductionRatePerHour for the assembly line, taking into account // its success rate @@ -11,7 +11,7 @@ func CalculateProductionRatePerHour(speed int) float64 { } // CalculateProductionRatePerMinute describes how many working items are -// produced by the asembly line every minute +// produced by the assembly line every minute func CalculateProductionRatePerMinute(speed int) int { return int(CalculateProductionRatePerHour(speed) / 60) } diff --git a/exercises/concept/numbers/numbers.go b/exercises/concept/cars-assemble/cars_assemble.go similarity index 97% rename from exercises/concept/numbers/numbers.go rename to exercises/concept/cars-assemble/cars_assemble.go index 8d7998bf0..64dc963f5 100644 --- a/exercises/concept/numbers/numbers.go +++ b/exercises/concept/cars-assemble/cars_assemble.go @@ -1,4 +1,4 @@ -package numbers +package cars // CalculateProductionRatePerHour for the assembly line, taking into account // its success rate diff --git a/exercises/concept/numbers/numbers_test.go b/exercises/concept/cars-assemble/cars_assemble_test.go similarity index 98% rename from exercises/concept/numbers/numbers_test.go rename to exercises/concept/cars-assemble/cars_assemble_test.go index 7b416cbef..a50eaffea 100644 --- a/exercises/concept/numbers/numbers_test.go +++ b/exercises/concept/cars-assemble/cars_assemble_test.go @@ -1,4 +1,4 @@ -package numbers_test +package cars import ( "numbers" diff --git a/exercises/concept/cars-assemble/go.mod b/exercises/concept/cars-assemble/go.mod new file mode 100644 index 000000000..422ef9899 --- /dev/null +++ b/exercises/concept/cars-assemble/go.mod @@ -0,0 +1,3 @@ +module cars + +go 1.13 diff --git a/exercises/concept/chessboard/.meta/config.json b/exercises/concept/chessboard/.meta/config.json index f146a57b7..85dcca2be 100644 --- a/exercises/concept/chessboard/.meta/config.json +++ b/exercises/concept/chessboard/.meta/config.json @@ -1,12 +1,12 @@ { - "blurb": "TODO: add blurb for chessboard exercise", + "blurb": "Learn about iterating ranges by generating a chessboard.", "authors": [ "brugnara", "tehsphinx" ], "contributors": [], "forked_from": [ - "Elixir/chessboard" + "elixir/chessboard" ], "files": { "solution": [ diff --git a/exercises/concept/chessboard/.meta/design.md b/exercises/concept/chessboard/.meta/design.md index b604c69cb..8946f7299 100644 --- a/exercises/concept/chessboard/.meta/design.md +++ b/exercises/concept/chessboard/.meta/design.md @@ -20,10 +20,11 @@ The goal of this exercise is to make the student familiar with the range loop on ## Concepts -- range-iteration +- `range-iteration` ## Prerequisites -- slices -- maps -- iteration +- `slices` +- `maps` +- `conditionals-if` +- `iteration` diff --git a/exercises/concept/conditionals/go.mod b/exercises/concept/conditionals/go.mod deleted file mode 100644 index d028f0d57..000000000 --- a/exercises/concept/conditionals/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module conditionals - -go 1.13 diff --git a/exercises/concept/constants/go.mod b/exercises/concept/constants/go.mod deleted file mode 100644 index 83de8cac7..000000000 --- a/exercises/concept/constants/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module constants - -go 1.14 diff --git a/exercises/concept/errors/.docs/hints.md b/exercises/concept/deep-thought/.docs/hints.md similarity index 100% rename from exercises/concept/errors/.docs/hints.md rename to exercises/concept/deep-thought/.docs/hints.md diff --git a/exercises/concept/errors/.docs/instructions.md b/exercises/concept/deep-thought/.docs/instructions.md similarity index 66% rename from exercises/concept/errors/.docs/instructions.md rename to exercises/concept/deep-thought/.docs/instructions.md index a77a70f8b..c9f04ae1d 100644 --- a/exercises/concept/errors/.docs/instructions.md +++ b/exercises/concept/deep-thought/.docs/instructions.md @@ -1,10 +1,14 @@ # Errors In this exercise, we will be implementing the programming logic in a package `deepthought`, -which checks whether an input equals to the absolute answer to life, the universe and everything. +which checks whether an input equals to [the absolute answer to life, the universe, and everything][deep-thought]. We have a constant `answer` which represents the answer to life, and a function `AnswerToLife` which checks the user input and returns a boolean and an error type. A requirement is also to have a general error `ErrCalculation` that we can at the same time use in our `AnswerToLife` function, and export to be used in other programs of ours. + +TODO: write instructions step by step + +[deep-thought]: https://hitchhikers.fandom.com/wiki/Deep_Thought diff --git a/exercises/concept/errors/.docs/introduction.md b/exercises/concept/deep-thought/.docs/introduction.md similarity index 100% rename from exercises/concept/errors/.docs/introduction.md rename to exercises/concept/deep-thought/.docs/introduction.md diff --git a/exercises/concept/deep-thought/.meta/config.json b/exercises/concept/deep-thought/.meta/config.json new file mode 100644 index 000000000..c2d136990 --- /dev/null +++ b/exercises/concept/deep-thought/.meta/config.json @@ -0,0 +1,17 @@ +{ + "blurb": "Learn about errors by finding the absolute answer to life, the universe, and everything.", + "authors": [ + "micuffaro" + ], + "files": { + "solution": [ + "deep_thought.go" + ], + "test": [ + "deep_thought_test.go" + ], + "exemplar": [ + ".meta/exemplar.go" + ] + } +} diff --git a/exercises/concept/errors/.meta/design.md b/exercises/concept/deep-thought/.meta/design.md similarity index 94% rename from exercises/concept/errors/.meta/design.md rename to exercises/concept/deep-thought/.meta/design.md index d4ceb2fe6..168e20c4e 100644 --- a/exercises/concept/errors/.meta/design.md +++ b/exercises/concept/deep-thought/.meta/design.md @@ -23,11 +23,12 @@ The goal of this exercise is to teach the student how to work with `errors` in G The Concepts this exercise unlocks are: -- `errors.basics` +- `errors` ## Prerequisites -- `constants`, `types` +- `constants` +- `types` ## Representer diff --git a/exercises/concept/errors/.meta/exemplar.go b/exercises/concept/deep-thought/.meta/exemplar.go similarity index 100% rename from exercises/concept/errors/.meta/exemplar.go rename to exercises/concept/deep-thought/.meta/exemplar.go diff --git a/exercises/concept/deep-thought/deep_thought.go b/exercises/concept/deep-thought/deep_thought.go new file mode 100644 index 000000000..368b84633 --- /dev/null +++ b/exercises/concept/deep-thought/deep_thought.go @@ -0,0 +1 @@ +// TODO: add solution stub diff --git a/exercises/concept/comments/comments_test.go b/exercises/concept/deep-thought/deep_thought_test.go similarity index 100% rename from exercises/concept/comments/comments_test.go rename to exercises/concept/deep-thought/deep_thought_test.go diff --git a/exercises/concept/methods/.docs/hints.md b/exercises/concept/elons-toys/.docs/hints.md similarity index 100% rename from exercises/concept/methods/.docs/hints.md rename to exercises/concept/elons-toys/.docs/hints.md diff --git a/exercises/concept/methods/.docs/instructions.md b/exercises/concept/elons-toys/.docs/instructions.md similarity index 97% rename from exercises/concept/methods/.docs/instructions.md rename to exercises/concept/elons-toys/.docs/instructions.md index bb87c0f23..ec0a1f4a9 100644 --- a/exercises/concept/methods/.docs/instructions.md +++ b/exercises/concept/elons-toys/.docs/instructions.md @@ -1,6 +1,6 @@ # Instructions -Note: This exercise is a continuation of the `structs` exercise. +Note: This exercise is a continuation of the `need-for-speed` exercise. In this exercise you'll be organizing races between various types of remote controlled cars. Each car has its own speed and battery drain characteristics. diff --git a/exercises/concept/methods/.docs/introduction.md b/exercises/concept/elons-toys/.docs/introduction.md similarity index 100% rename from exercises/concept/methods/.docs/introduction.md rename to exercises/concept/elons-toys/.docs/introduction.md diff --git a/exercises/concept/methods/.meta/config.json b/exercises/concept/elons-toys/.meta/config.json similarity index 61% rename from exercises/concept/methods/.meta/config.json rename to exercises/concept/elons-toys/.meta/config.json index 998dd6f58..afb1420ee 100644 --- a/exercises/concept/methods/.meta/config.json +++ b/exercises/concept/elons-toys/.meta/config.json @@ -1,5 +1,5 @@ { - "blurb": "TODO: add blurb for methods exercise", + "blurb": "Learn about methods by playing with Elon's toys", "authors": [ "tehsphinx" ], @@ -7,14 +7,14 @@ "oanaOM" ], "forked_from": [ - "csharp/classes" + "csharp/elons-toys" ], "files": { "solution": [ - "methods.go" + "elons_toys.go" ], "test": [ - "methods_test.go" + "elons_toys_test.go" ], "exemplar": [ ".meta/exemplar.go" diff --git a/exercises/concept/methods/.meta/design.md b/exercises/concept/elons-toys/.meta/design.md similarity index 96% rename from exercises/concept/methods/.meta/design.md rename to exercises/concept/elons-toys/.meta/design.md index 280e50dde..2cc990e91 100644 --- a/exercises/concept/methods/.meta/design.md +++ b/exercises/concept/elons-toys/.meta/design.md @@ -20,5 +20,4 @@ The Concepts this exercise unlocks are: ## Prerequisites - `structs` -- `functions` - `pointers` diff --git a/exercises/concept/methods/.meta/exemplar.go b/exercises/concept/elons-toys/.meta/exemplar.go similarity index 98% rename from exercises/concept/methods/.meta/exemplar.go rename to exercises/concept/elons-toys/.meta/exemplar.go index 3c1816571..3f92f5504 100644 --- a/exercises/concept/methods/.meta/exemplar.go +++ b/exercises/concept/elons-toys/.meta/exemplar.go @@ -1,4 +1,4 @@ -package _meta +package elon import "fmt" diff --git a/exercises/concept/methods/methods.go b/exercises/concept/elons-toys/elons_toys.go similarity index 98% rename from exercises/concept/methods/methods.go rename to exercises/concept/elons-toys/elons_toys.go index 12a190625..b613a9d65 100644 --- a/exercises/concept/methods/methods.go +++ b/exercises/concept/elons-toys/elons_toys.go @@ -1,4 +1,4 @@ -package methods +package elon // Car implements a remote controlled car. type Car struct { diff --git a/exercises/concept/methods/methods_test.go b/exercises/concept/elons-toys/elons_toys_test.go similarity index 99% rename from exercises/concept/methods/methods_test.go rename to exercises/concept/elons-toys/elons_toys_test.go index e343bba06..be22e8c41 100644 --- a/exercises/concept/methods/methods_test.go +++ b/exercises/concept/elons-toys/elons_toys_test.go @@ -1,4 +1,4 @@ -package methods +package elon import ( "reflect" diff --git a/exercises/concept/methods/go.mod b/exercises/concept/elons-toys/go.mod similarity index 76% rename from exercises/concept/methods/go.mod rename to exercises/concept/elons-toys/go.mod index a8a0160d9..a18aa3abd 100644 --- a/exercises/concept/methods/go.mod +++ b/exercises/concept/elons-toys/go.mod @@ -1,4 +1,4 @@ -module methods +module elon go 1.13 diff --git a/exercises/concept/errors/.meta/config.json b/exercises/concept/errors/.meta/config.json deleted file mode 100644 index ec7da1c88..000000000 --- a/exercises/concept/errors/.meta/config.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "blurb": "TODO: add blurb for errors exercise", - "authors": [ - "micuffaro" - ], - "files": { - "solution": [ - "errors.go" - ], - "test": [ - "errors_test.go" - ], - "exemplar": [ - ".meta/exemplar.go" - ] - } -} diff --git a/exercises/concept/errors/errors.go b/exercises/concept/errors/errors.go deleted file mode 100644 index e69de29bb..000000000 diff --git a/exercises/concept/maps/.docs/hints.md b/exercises/concept/gross-store/.docs/hints.md similarity index 100% rename from exercises/concept/maps/.docs/hints.md rename to exercises/concept/gross-store/.docs/hints.md diff --git a/exercises/concept/maps/.docs/instructions.md b/exercises/concept/gross-store/.docs/instructions.md similarity index 100% rename from exercises/concept/maps/.docs/instructions.md rename to exercises/concept/gross-store/.docs/instructions.md diff --git a/exercises/concept/maps/.docs/introduction.md b/exercises/concept/gross-store/.docs/introduction.md similarity index 100% rename from exercises/concept/maps/.docs/introduction.md rename to exercises/concept/gross-store/.docs/introduction.md diff --git a/exercises/concept/maps/.meta/config.json b/exercises/concept/gross-store/.meta/config.json similarity index 54% rename from exercises/concept/maps/.meta/config.json rename to exercises/concept/gross-store/.meta/config.json index a1c41afe5..93ed1069a 100644 --- a/exercises/concept/maps/.meta/config.json +++ b/exercises/concept/gross-store/.meta/config.json @@ -1,14 +1,14 @@ { - "blurb": "TODO: add blurb for maps exercise", + "blurb": "Learn about maps by selling items by the dozen at the Gross Store.", "authors": [ "chocopowwwa" ], "files": { "solution": [ - "maps.go" + "gross_store.go" ], "test": [ - "maps_test.go" + "gross_store_test.go" ], "exemplar": [ ".meta/exemplar.go" diff --git a/exercises/concept/maps/.meta/design.md b/exercises/concept/gross-store/.meta/design.md similarity index 93% rename from exercises/concept/maps/.meta/design.md rename to exercises/concept/gross-store/.meta/design.md index fb0996c90..d2ec4f340 100644 --- a/exercises/concept/maps/.meta/design.md +++ b/exercises/concept/gross-store/.meta/design.md @@ -23,9 +23,9 @@ The goal is to introduce the student to maps. ## Prerequisites +- `basics` - `numbers` -- `conditionals` -- `functions` +- `conditionals-if` ## Representer diff --git a/exercises/concept/maps/.meta/exemplar.go b/exercises/concept/gross-store/.meta/exemplar.go similarity index 94% rename from exercises/concept/maps/.meta/exemplar.go rename to exercises/concept/gross-store/.meta/exemplar.go index 8d46bbbd6..f40e63591 100644 --- a/exercises/concept/maps/.meta/exemplar.go +++ b/exercises/concept/gross-store/.meta/exemplar.go @@ -1,6 +1,6 @@ -package maps +package gross -// Units store the Dozen Store unit measurement +// Units store the Gross Store unit measurement func Units() map[string]int { return map[string]int{ "quarter_of_a_dozen": 3, diff --git a/exercises/concept/gross-store/go.mod b/exercises/concept/gross-store/go.mod new file mode 100644 index 000000000..e450e7938 --- /dev/null +++ b/exercises/concept/gross-store/go.mod @@ -0,0 +1,3 @@ +module gross + +go 1.13 diff --git a/exercises/concept/maps/maps.go b/exercises/concept/gross-store/gross_store.go similarity index 92% rename from exercises/concept/maps/maps.go rename to exercises/concept/gross-store/gross_store.go index e9ef3c58a..74d393af5 100644 --- a/exercises/concept/maps/maps.go +++ b/exercises/concept/gross-store/gross_store.go @@ -1,6 +1,6 @@ -package maps +package gross -// Units store the Dozen Store unit measurement +// Units store the Gross Store unit measurement func Units() map[string]int { panic("Please implement the Units() function") } diff --git a/exercises/concept/maps/maps_test.go b/exercises/concept/gross-store/gross_store_test.go similarity index 99% rename from exercises/concept/maps/maps_test.go rename to exercises/concept/gross-store/gross_store_test.go index 1c7f287c8..b1414bff8 100644 --- a/exercises/concept/maps/maps_test.go +++ b/exercises/concept/gross-store/gross_store_test.go @@ -1,4 +1,4 @@ -package maps +package gross import ( "testing" diff --git a/exercises/concept/lasagna/.meta/config.json b/exercises/concept/lasagna/.meta/config.json index 40f2facba..0cc085196 100644 --- a/exercises/concept/lasagna/.meta/config.json +++ b/exercises/concept/lasagna/.meta/config.json @@ -1,5 +1,5 @@ { - "blurb": "TODO: add blurb for lasagna exercise", + "blurb": "Learn about packages, functions, and variables by helping Gopher cook lasagna.", "authors": [ "tehsphinx" ], diff --git a/exercises/concept/strings-package/.docs/hints.md b/exercises/concept/logs-logs-logs/.docs/hints.md similarity index 100% rename from exercises/concept/strings-package/.docs/hints.md rename to exercises/concept/logs-logs-logs/.docs/hints.md diff --git a/exercises/concept/strings-package/.docs/instructions.md b/exercises/concept/logs-logs-logs/.docs/instructions.md similarity index 100% rename from exercises/concept/strings-package/.docs/instructions.md rename to exercises/concept/logs-logs-logs/.docs/instructions.md diff --git a/exercises/concept/strings-package/.docs/introduction.md b/exercises/concept/logs-logs-logs/.docs/introduction.md similarity index 90% rename from exercises/concept/strings-package/.docs/introduction.md rename to exercises/concept/logs-logs-logs/.docs/introduction.md index 0517ffcae..096768c9f 100644 --- a/exercises/concept/strings-package/.docs/introduction.md +++ b/exercises/concept/logs-logs-logs/.docs/introduction.md @@ -14,5 +14,3 @@ With that said, string types are immutable so operations like s[i] = 'a' are not [Strings, bytes, runes and characters in Go](https://blog.golang.org/strings) provides a deep dive into this topic. -This exercise also introduces _conditionals_. Here is a little intro: -[Go by Example: If/Else](https://gobyexample.com/if-else) diff --git a/exercises/concept/slices/.meta/config.json b/exercises/concept/logs-logs-logs/.meta/config.json similarity index 60% rename from exercises/concept/slices/.meta/config.json rename to exercises/concept/logs-logs-logs/.meta/config.json index 726ade455..4afec45bb 100644 --- a/exercises/concept/slices/.meta/config.json +++ b/exercises/concept/logs-logs-logs/.meta/config.json @@ -1,14 +1,14 @@ { - "blurb": "TODO: add blurb for slices exercise", + "blurb": "Learn about the strings package by parsing logs.", "authors": [ "tehsphinx" ], "files": { "solution": [ - "slices.go" + "logs.go" ], "test": [ - "slices_test.go" + "logs_test.go" ], "exemplar": [ ".meta/exemplar.go" diff --git a/exercises/concept/strings-package/.meta/design.md b/exercises/concept/logs-logs-logs/.meta/design.md similarity index 95% rename from exercises/concept/strings-package/.meta/design.md rename to exercises/concept/logs-logs-logs/.meta/design.md index f291996b4..d70d20e41 100644 --- a/exercises/concept/strings-package/.meta/design.md +++ b/exercises/concept/logs-logs-logs/.meta/design.md @@ -16,7 +16,7 @@ The goal of this exercise is to teach the student about the strings package. ## Concepts -- `strings` +- `strings-package` ## Prerequisites diff --git a/exercises/concept/strings-package/.meta/exemplar.go b/exercises/concept/logs-logs-logs/.meta/exemplar.go similarity index 100% rename from exercises/concept/strings-package/.meta/exemplar.go rename to exercises/concept/logs-logs-logs/.meta/exemplar.go diff --git a/exercises/concept/logs-logs-logs/go.mod b/exercises/concept/logs-logs-logs/go.mod new file mode 100644 index 000000000..507e1dcbe --- /dev/null +++ b/exercises/concept/logs-logs-logs/go.mod @@ -0,0 +1,3 @@ +module logs + +go 1.13 diff --git a/exercises/concept/strings-package/strings.go b/exercises/concept/logs-logs-logs/logs.go similarity index 96% rename from exercises/concept/strings-package/strings.go rename to exercises/concept/logs-logs-logs/logs.go index 7cde81f55..be17a9b36 100644 --- a/exercises/concept/strings-package/strings.go +++ b/exercises/concept/logs-logs-logs/logs.go @@ -1,4 +1,4 @@ -package strings_package +package logs // Message extracts the message from the provided log line. func Message(line string) string { diff --git a/exercises/concept/strings-package/strings_test.go b/exercises/concept/logs-logs-logs/logs_test.go similarity index 99% rename from exercises/concept/strings-package/strings_test.go rename to exercises/concept/logs-logs-logs/logs_test.go index 99b99cda0..a312dbf0d 100644 --- a/exercises/concept/strings-package/strings_test.go +++ b/exercises/concept/logs-logs-logs/logs_test.go @@ -1,4 +1,4 @@ -package strings_package +package logs import ( "strings" diff --git a/exercises/concept/maps/go.mod b/exercises/concept/maps/go.mod deleted file mode 100644 index a32bd1670..000000000 --- a/exercises/concept/maps/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module maps - -go 1.13 diff --git a/exercises/concept/structs/.docs/hints.md b/exercises/concept/need-for-speed/.docs/hints.md similarity index 100% rename from exercises/concept/structs/.docs/hints.md rename to exercises/concept/need-for-speed/.docs/hints.md diff --git a/exercises/concept/structs/.docs/instructions.md b/exercises/concept/need-for-speed/.docs/instructions.md similarity index 100% rename from exercises/concept/structs/.docs/instructions.md rename to exercises/concept/need-for-speed/.docs/instructions.md diff --git a/exercises/concept/structs/.docs/introduction.md b/exercises/concept/need-for-speed/.docs/introduction.md similarity index 100% rename from exercises/concept/structs/.docs/introduction.md rename to exercises/concept/need-for-speed/.docs/introduction.md diff --git a/exercises/concept/structs/.meta/config.json b/exercises/concept/need-for-speed/.meta/config.json similarity index 58% rename from exercises/concept/structs/.meta/config.json rename to exercises/concept/need-for-speed/.meta/config.json index 92280205f..4c9b0a9a5 100644 --- a/exercises/concept/structs/.meta/config.json +++ b/exercises/concept/need-for-speed/.meta/config.json @@ -1,5 +1,5 @@ { - "blurb": "TODO: add blurb for structs exercise", + "blurb": "Learn about structs by racing remote controlled cars.", "authors": [ "tehsphinx" ], @@ -7,14 +7,14 @@ "oanaOM" ], "forked_from": [ - "csharp/constructors" + "csharp/need-for-speed" ], "files": { "solution": [ - "structs.go" + "need_for_speed.go" ], "test": [ - "structs_test.go" + "need_for_speed_test.go" ], "exemplar": [ ".meta/exemplar.go" diff --git a/exercises/concept/structs/.meta/design.md b/exercises/concept/need-for-speed/.meta/design.md similarity index 93% rename from exercises/concept/structs/.meta/design.md rename to exercises/concept/need-for-speed/.meta/design.md index d02e7a818..36ae92c7b 100644 --- a/exercises/concept/structs/.meta/design.md +++ b/exercises/concept/need-for-speed/.meta/design.md @@ -20,4 +20,4 @@ ## Prerequisites - `numbers` -- `conditionals` +- `conditionals-if` diff --git a/exercises/concept/structs/.meta/exemplar.go b/exercises/concept/need-for-speed/.meta/exemplar.go similarity index 98% rename from exercises/concept/structs/.meta/exemplar.go rename to exercises/concept/need-for-speed/.meta/exemplar.go index 240fad415..940fbde47 100644 --- a/exercises/concept/structs/.meta/exemplar.go +++ b/exercises/concept/need-for-speed/.meta/exemplar.go @@ -1,4 +1,4 @@ -package _meta +package speed // NewCar creates a new car with given specifications. func NewCar(speed, batteryDrain int) Car { diff --git a/exercises/concept/structs/structs.go b/exercises/concept/need-for-speed/need_for_speed.go similarity index 92% rename from exercises/concept/structs/structs.go rename to exercises/concept/need-for-speed/need_for_speed.go index edad62d8d..76217b831 100644 --- a/exercises/concept/structs/structs.go +++ b/exercises/concept/need-for-speed/need_for_speed.go @@ -1,4 +1,4 @@ -package structs +package speed // Car implements a remote controlled car. type Car struct { @@ -26,7 +26,7 @@ type Track struct{ // NewTrack created a new track func NewTrack(distance int) Track{ - panic("Please implement the NewTrack function") + panic("Please implement the NewTrack function") } // Drive drives the car one time. If there is not enough battry to drive on more time, diff --git a/exercises/concept/structs/structs_test.go b/exercises/concept/need-for-speed/need_for_speed_test.go similarity index 95% rename from exercises/concept/structs/structs_test.go rename to exercises/concept/need-for-speed/need_for_speed_test.go index 24b948232..add248015 100644 --- a/exercises/concept/structs/structs_test.go +++ b/exercises/concept/need-for-speed/need_for_speed_test.go @@ -1,4 +1,4 @@ -package structs +package speed import "testing" @@ -13,7 +13,7 @@ func TestNewCar(t *testing.T){ car: Car{ speed: 5, batteryDrain: 2, - battery: 100, + battery: 100, }, expected: Car{ speed: 5, @@ -86,7 +86,7 @@ func TestDrive(t *testing.T){ car: Car{ speed: 5, batteryDrain: 2, - battery: 100, + battery: 100, distance: 0, }, expected: Car{ @@ -102,7 +102,7 @@ func TestDrive(t *testing.T){ car: Car{ speed: 5, batteryDrain: 5, - battery: 4, + battery: 4, distance: 0, }, expected: Car{ @@ -139,7 +139,7 @@ func TestCanFinish(t *testing.T){ car: Car{ speed: 5, batteryDrain: 2, - battery: 100, + battery: 100, distance: 20, }, track: Track{ @@ -152,7 +152,7 @@ func TestCanFinish(t *testing.T){ car: Car{ speed: 5, batteryDrain: 5, - battery: 100, + battery: 100, distance: 20, }, track: Track{ @@ -165,7 +165,7 @@ func TestCanFinish(t *testing.T){ car: Car{ speed: 2, batteryDrain: 10, - battery: 100, + battery: 100, distance: 5, }, track: Track{ diff --git a/exercises/concept/numbers/go.mod b/exercises/concept/numbers/go.mod deleted file mode 100644 index 03819e424..000000000 --- a/exercises/concept/numbers/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module numbers - -go 1.13 diff --git a/exercises/concept/strings/.docs/hints.md b/exercises/concept/party-robot/.docs/hints.md similarity index 100% rename from exercises/concept/strings/.docs/hints.md rename to exercises/concept/party-robot/.docs/hints.md diff --git a/exercises/concept/strings/.docs/instructions.md b/exercises/concept/party-robot/.docs/instructions.md similarity index 100% rename from exercises/concept/strings/.docs/instructions.md rename to exercises/concept/party-robot/.docs/instructions.md diff --git a/exercises/concept/strings/.docs/introduction.md b/exercises/concept/party-robot/.docs/introduction.md similarity index 100% rename from exercises/concept/strings/.docs/introduction.md rename to exercises/concept/party-robot/.docs/introduction.md diff --git a/exercises/concept/strings/.meta/config.json b/exercises/concept/party-robot/.meta/config.json similarity index 62% rename from exercises/concept/strings/.meta/config.json rename to exercises/concept/party-robot/.meta/config.json index 6cf1228b2..ad6bc46bd 100644 --- a/exercises/concept/strings/.meta/config.json +++ b/exercises/concept/party-robot/.meta/config.json @@ -1,5 +1,5 @@ { - "blurb": "TODO: add blurb for strings exercise", + "blurb": "Learn about strings by programming a party robot.", "authors": [ "tehsphinx" ], @@ -8,10 +8,10 @@ ], "files": { "solution": [ - "strings.go" + "party_robot.go" ], "test": [ - "strings_test.go" + "party_robot_test.go" ], "exemplar": [ ".meta/exemplar.go" diff --git a/exercises/concept/strings/.meta/design.md b/exercises/concept/party-robot/.meta/design.md similarity index 100% rename from exercises/concept/strings/.meta/design.md rename to exercises/concept/party-robot/.meta/design.md diff --git a/exercises/concept/strings/.meta/exemplar.go b/exercises/concept/party-robot/.meta/exemplar.go similarity index 97% rename from exercises/concept/strings/.meta/exemplar.go rename to exercises/concept/party-robot/.meta/exemplar.go index 524e357d6..9f1cf8a51 100644 --- a/exercises/concept/strings/.meta/exemplar.go +++ b/exercises/concept/party-robot/.meta/exemplar.go @@ -1,4 +1,4 @@ -package _meta +package partyrobot import "fmt" diff --git a/exercises/concept/strings/go.mod b/exercises/concept/party-robot/go.mod similarity index 100% rename from exercises/concept/strings/go.mod rename to exercises/concept/party-robot/go.mod diff --git a/exercises/concept/strings/strings.go b/exercises/concept/party-robot/party_robot.go similarity index 96% rename from exercises/concept/strings/strings.go rename to exercises/concept/party-robot/party_robot.go index 64e101d75..92f9e2631 100644 --- a/exercises/concept/strings/strings.go +++ b/exercises/concept/party-robot/party_robot.go @@ -1,4 +1,4 @@ -package strings +package partyrobot // Welcome greets a person by name. func Welcome(name string) string { diff --git a/exercises/concept/strings/strings_test.go b/exercises/concept/party-robot/party_robot_test.go similarity index 99% rename from exercises/concept/strings/strings_test.go rename to exercises/concept/party-robot/party_robot_test.go index 345bde270..77c50296e 100644 --- a/exercises/concept/strings/strings_test.go +++ b/exercises/concept/party-robot/party_robot_test.go @@ -1,4 +1,4 @@ -package strings +package partyrobot import "testing" diff --git a/exercises/concept/constants/.docs/hints.md b/exercises/concept/savings-account/.docs/hints.md similarity index 100% rename from exercises/concept/constants/.docs/hints.md rename to exercises/concept/savings-account/.docs/hints.md diff --git a/exercises/concept/constants/.docs/instructions.md b/exercises/concept/savings-account/.docs/instructions.md similarity index 100% rename from exercises/concept/constants/.docs/instructions.md rename to exercises/concept/savings-account/.docs/instructions.md diff --git a/exercises/concept/constants/.docs/introduction.md b/exercises/concept/savings-account/.docs/introduction.md similarity index 100% rename from exercises/concept/constants/.docs/introduction.md rename to exercises/concept/savings-account/.docs/introduction.md diff --git a/exercises/concept/constants/.meta/config.json b/exercises/concept/savings-account/.meta/config.json similarity index 55% rename from exercises/concept/constants/.meta/config.json rename to exercises/concept/savings-account/.meta/config.json index 6a53683e1..4219f8862 100644 --- a/exercises/concept/constants/.meta/config.json +++ b/exercises/concept/savings-account/.meta/config.json @@ -1,14 +1,14 @@ { - "blurb": "TODO: add blurb for constants exercise", + "blurb": "Learn about constants by managing a savings account.", "authors": [ "jamessouth" ], "files": { "solution": [ - "constants.go" + "savings_account.go" ], "test": [ - "constants_test.go" + "savings_account_test.go" ], "exemplar": [ ".meta/exemplar.go" diff --git a/exercises/concept/constants/.meta/design.md b/exercises/concept/savings-account/.meta/design.md similarity index 98% rename from exercises/concept/constants/.meta/design.md rename to exercises/concept/savings-account/.meta/design.md index c18d3c430..b8dba0d65 100644 --- a/exercises/concept/constants/.meta/design.md +++ b/exercises/concept/savings-account/.meta/design.md @@ -15,8 +15,7 @@ The goal of this exercise is to teach the student about constants in Go. ## Concepts -- `const` -- `iota` +- `constants` ## Prerequisites diff --git a/exercises/concept/constants/.meta/exemplar.go b/exercises/concept/savings-account/.meta/exemplar.go similarity index 98% rename from exercises/concept/constants/.meta/exemplar.go rename to exercises/concept/savings-account/.meta/exemplar.go index c1a378204..63a1cb4c7 100644 --- a/exercises/concept/constants/.meta/exemplar.go +++ b/exercises/concept/savings-account/.meta/exemplar.go @@ -1,4 +1,4 @@ -package _meta +package savings // FixedInterestRate has a value of 5% const FixedInterestRate = 0.05 diff --git a/exercises/concept/savings-account/go.mod b/exercises/concept/savings-account/go.mod new file mode 100644 index 000000000..7e1c40d0d --- /dev/null +++ b/exercises/concept/savings-account/go.mod @@ -0,0 +1,3 @@ +module savings + +go 1.14 diff --git a/exercises/concept/constants/constants.go b/exercises/concept/savings-account/savings_account.go similarity index 98% rename from exercises/concept/constants/constants.go rename to exercises/concept/savings-account/savings_account.go index 4e74625b7..56b73782d 100644 --- a/exercises/concept/constants/constants.go +++ b/exercises/concept/savings-account/savings_account.go @@ -1,4 +1,4 @@ -package constants +package savings // FixedInterestRate has a value of 5% (5/100) diff --git a/exercises/concept/constants/constants_test.go b/exercises/concept/savings-account/savings_account_test.go similarity index 98% rename from exercises/concept/constants/constants_test.go rename to exercises/concept/savings-account/savings_account_test.go index 85fe1c568..21e1e8ddf 100644 --- a/exercises/concept/constants/constants_test.go +++ b/exercises/concept/savings-account/savings_account_test.go @@ -1,4 +1,4 @@ -package constants +package savings import ( "testing" diff --git a/exercises/concept/slices/go.mod b/exercises/concept/slices/go.mod deleted file mode 100644 index 5ebbddb80..000000000 --- a/exercises/concept/slices/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module basic_slices - -go 1.13 diff --git a/exercises/concept/strings-package/go.mod b/exercises/concept/strings-package/go.mod deleted file mode 100644 index 83be3d7f0..000000000 --- a/exercises/concept/strings-package/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module strings_advanced - -go 1.13 diff --git a/exercises/concept/time/.meta/config.json b/exercises/concept/time/.meta/config.json deleted file mode 100644 index a2d07983e..000000000 --- a/exercises/concept/time/.meta/config.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "blurb": "TODO: add blurb for time exercise", - "authors": [ - "jamessouth" - ], - "forked_from": [ - "csharp/datetimes" - ], - "files": { - "solution": [ - "time.go" - ], - "test": [ - "time_test.go" - ], - "exemplar": [ - ".meta/exemplar.go" - ] - } -} diff --git a/exercises/concept/time/go.mod b/exercises/concept/time/go.mod deleted file mode 100644 index a047c0638..000000000 --- a/exercises/concept/time/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module time - -go 1.14 diff --git a/exercises/concept/comments/.docs/hints.md b/exercises/concept/weather-forecast/.docs/hints.md similarity index 100% rename from exercises/concept/comments/.docs/hints.md rename to exercises/concept/weather-forecast/.docs/hints.md diff --git a/exercises/concept/comments/.docs/instructions.md b/exercises/concept/weather-forecast/.docs/instructions.md similarity index 100% rename from exercises/concept/comments/.docs/instructions.md rename to exercises/concept/weather-forecast/.docs/instructions.md diff --git a/exercises/concept/comments/.docs/introduction.md b/exercises/concept/weather-forecast/.docs/introduction.md similarity index 100% rename from exercises/concept/comments/.docs/introduction.md rename to exercises/concept/weather-forecast/.docs/introduction.md diff --git a/exercises/concept/comments/.meta/config.json b/exercises/concept/weather-forecast/.meta/config.json similarity index 51% rename from exercises/concept/comments/.meta/config.json rename to exercises/concept/weather-forecast/.meta/config.json index 4878098de..12500ca2b 100644 --- a/exercises/concept/comments/.meta/config.json +++ b/exercises/concept/weather-forecast/.meta/config.json @@ -1,14 +1,14 @@ { - "blurb": "TODO: add blurb for comments exercise", + "blurb": "Learn about comments by helping a weather station manage their weather forecasting program.", "authors": [ "nikimanoledaki" ], "files": { "solution": [ - "comments.go" + "weather.go" ], "test": [ - "comments_test.go" + "weather_test.go" ], "exemplar": [ ".meta/exemplar.go" diff --git a/exercises/concept/comments/.meta/design.md b/exercises/concept/weather-forecast/.meta/design.md similarity index 100% rename from exercises/concept/comments/.meta/design.md rename to exercises/concept/weather-forecast/.meta/design.md diff --git a/exercises/concept/comments/.meta/exemplar.go b/exercises/concept/weather-forecast/.meta/exemplar.go similarity index 100% rename from exercises/concept/comments/.meta/exemplar.go rename to exercises/concept/weather-forecast/.meta/exemplar.go diff --git a/exercises/concept/comments/comments.go b/exercises/concept/weather-forecast/weather.go similarity index 100% rename from exercises/concept/comments/comments.go rename to exercises/concept/weather-forecast/weather.go diff --git a/exercises/concept/errors/errors_test.go b/exercises/concept/weather-forecast/weather_test.go similarity index 100% rename from exercises/concept/errors/errors_test.go rename to exercises/concept/weather-forecast/weather_test.go diff --git a/exercises/concept/zero-value/go.mod b/exercises/concept/zero-value/go.mod deleted file mode 100644 index 37847454f..000000000 --- a/exercises/concept/zero-value/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module nil - -go 1.14 diff --git a/exercises/concept/zero-value/.docs/hints.md b/exercises/concept/zero-zilch-nada/.docs/hints.md similarity index 100% rename from exercises/concept/zero-value/.docs/hints.md rename to exercises/concept/zero-zilch-nada/.docs/hints.md diff --git a/exercises/concept/zero-value/.docs/instructions.md b/exercises/concept/zero-zilch-nada/.docs/instructions.md similarity index 100% rename from exercises/concept/zero-value/.docs/instructions.md rename to exercises/concept/zero-zilch-nada/.docs/instructions.md diff --git a/exercises/concept/zero-value/.docs/introduction.md b/exercises/concept/zero-zilch-nada/.docs/introduction.md similarity index 100% rename from exercises/concept/zero-value/.docs/introduction.md rename to exercises/concept/zero-zilch-nada/.docs/introduction.md diff --git a/exercises/concept/zero-value/.meta/config.json b/exercises/concept/zero-zilch-nada/.meta/config.json similarity index 65% rename from exercises/concept/zero-value/.meta/config.json rename to exercises/concept/zero-zilch-nada/.meta/config.json index fc0c49012..5cec9cc11 100644 --- a/exercises/concept/zero-value/.meta/config.json +++ b/exercises/concept/zero-zilch-nada/.meta/config.json @@ -1,5 +1,5 @@ { - "blurb": "TODO: add blurb for zero-value exercise", + "blurb": "Learn about zero values.", "authors": [ "jamessouth" ], @@ -8,10 +8,10 @@ ], "files": { "solution": [ - "zero_value.go" + "zero_zilch_nada.go" ], "test": [ - "zero_value_test.go" + "zero_zilch_nada_test.go" ], "exemplar": [ ".meta/exemplar.go" diff --git a/exercises/concept/zero-value/.meta/design.md b/exercises/concept/zero-zilch-nada/.meta/design.md similarity index 97% rename from exercises/concept/zero-value/.meta/design.md rename to exercises/concept/zero-zilch-nada/.meta/design.md index 7f3a37f03..fb7165352 100644 --- a/exercises/concept/zero-value/.meta/design.md +++ b/exercises/concept/zero-zilch-nada/.meta/design.md @@ -19,7 +19,7 @@ The goal of this exercise is to teach the student about `nil` and other zero val ## Concepts - `nil` -- zero values +- `zero-values` ## Prerequisites diff --git a/exercises/concept/zero-value/.meta/exemplar.go b/exercises/concept/zero-zilch-nada/.meta/exemplar.go similarity index 98% rename from exercises/concept/zero-value/.meta/exemplar.go rename to exercises/concept/zero-zilch-nada/.meta/exemplar.go index cc68c4753..6d97598ed 100644 --- a/exercises/concept/zero-value/.meta/exemplar.go +++ b/exercises/concept/zero-zilch-nada/.meta/exemplar.go @@ -1,4 +1,4 @@ -package _meta +package zero // EmptyBool returns an empty (zero value) bool func EmptyBool() bool { diff --git a/exercises/concept/zero-zilch-nada/go.mod b/exercises/concept/zero-zilch-nada/go.mod new file mode 100644 index 000000000..01aeb3f38 --- /dev/null +++ b/exercises/concept/zero-zilch-nada/go.mod @@ -0,0 +1,3 @@ +module zero + +go 1.14 diff --git a/exercises/concept/zero-value/zero_value.go b/exercises/concept/zero-zilch-nada/zero_zilch_nada.go similarity index 98% rename from exercises/concept/zero-value/zero_value.go rename to exercises/concept/zero-zilch-nada/zero_zilch_nada.go index c35f63f31..21e80467a 100644 --- a/exercises/concept/zero-value/zero_value.go +++ b/exercises/concept/zero-zilch-nada/zero_zilch_nada.go @@ -1,4 +1,4 @@ -package zero_value +package zero // EmptyBool returns an empty (zero value) bool func EmptyBool() bool { diff --git a/exercises/concept/zero-value/zero_value_test.go b/exercises/concept/zero-zilch-nada/zero_zilch_nada_test.go similarity index 99% rename from exercises/concept/zero-value/zero_value_test.go rename to exercises/concept/zero-zilch-nada/zero_zilch_nada_test.go index 95ebe4ebb..d0739d21a 100644 --- a/exercises/concept/zero-value/zero_value_test.go +++ b/exercises/concept/zero-zilch-nada/zero_zilch_nada_test.go @@ -1,4 +1,4 @@ -package zero_value +package zero import ( "reflect" diff --git a/reference/implementing-a-concept-exercise.md b/reference/implementing-a-concept-exercise.md index 1e59dfcd3..04aff16e4 100644 --- a/reference/implementing-a-concept-exercise.md +++ b/reference/implementing-a-concept-exercise.md @@ -93,8 +93,8 @@ If you have any questions regarding implementing the exercise, please post them [docs-rationale-for-v3]: https://github.com/exercism/v3/blob/main/docs/rationale-for-v3.md [docs-features-of-v3]: https://github.com/exercism/v3/blob/main/docs/features-of-v3.md [anatomy-of-a-concept-exercise]: https://www.youtube.com/watch?v=gkbBqd7hPrA -[concept-exercise-basic-strings]: ../exercises/concept/strings-package -[concept-exercise-numbers]: ../exercises/concept/numbers +[concept-exercise-basic-strings]: ../exercises/concept/logs-logs-logs +[concept-exercise-numbers]: ../exercises/concept/cars-assemble [reference]: https://github.com/exercism/v3/blob/main/reference [style guide]: ../docs/style-guide.md [implemented-exercises]: ../exercises/concept/README.md#implemented-exercises