aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--exercises/if/if2/main_test.go2
-rw-r--r--exercises/switch/switch1/main.go17
-rw-r--r--info.toml7
3 files changed, 25 insertions, 1 deletions
diff --git a/exercises/if/if2/main_test.go b/exercises/if/if2/main_test.go
index 5119dab..718c509 100644
--- a/exercises/if/if2/main_test.go
+++ b/exercises/if/if2/main_test.go
@@ -1,4 +1,4 @@
-// if1
+// if2
// Make me compile!
// I AM NOT DONE
diff --git a/exercises/switch/switch1/main.go b/exercises/switch/switch1/main.go
new file mode 100644
index 0000000..055b297
--- /dev/null
+++ b/exercises/switch/switch1/main.go
@@ -0,0 +1,17 @@
+// switch1
+// Make me compile!
+
+// I AM NOT DONE
+package main
+
+import "fmt"
+
+func main() {
+ status := "open"
+ switch {
+ case "open":
+ fmt.Println("status is open")
+ case "closed":
+ fmt.Println("status is closed")
+ }
+}
diff --git a/info.toml b/info.toml
index d0ec349..5f74b98 100644
--- a/info.toml
+++ b/info.toml
@@ -82,3 +82,10 @@ path = "exercises/if/if2/main_test.go"
mode = "test"
hint = """
"""
+
+[[exercises]]
+name = "switch1"
+path = "exercises/switch/switch1/main.go"
+mode = "compile"
+hint = """
+Switch flow is missing a variable to evaluate the statement."""