diff options
Diffstat (limited to 'exercises')
-rw-r--r-- | exercises/if/if2/main_test.go | 2 | ||||
-rw-r--r-- | exercises/switch/switch1/main.go | 17 |
2 files changed, 18 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") + } +} |