From 9e8d0127d45d3e20e9dee7c4668239a1e373d078 Mon Sep 17 00:00:00 2001 From: Mark McGranaghan Date: Thu, 25 Oct 2012 21:24:22 -0400 Subject: [PATCH] drop ok-guards for now --- examples.txt | 1 - examples/ok-guards/ok-guards.go | 20 -------------------- 2 files changed, 21 deletions(-) delete mode 100644 examples/ok-guards/ok-guards.go diff --git a/examples.txt b/examples.txt index 5b3c8ce..168b43a 100644 --- a/examples.txt +++ b/examples.txt @@ -20,7 +20,6 @@ Methods # Interfaces # Embedding # Errors -# OK Guards Goroutines Channels Channel Buffering diff --git a/examples/ok-guards/ok-guards.go b/examples/ok-guards/ok-guards.go deleted file mode 100644 index ab59e99..0000000 --- a/examples/ok-guards/ok-guards.go +++ /dev/null @@ -1,20 +0,0 @@ -package main - -import "fmt" - -func main() { - x := make(map[string]string) - x["here"] = "yes" - - if name, ok := x["?"]; ok { - fmt.Println(name) - } else { - fmt.Println("miss") - } - - if name, ok := x["here"]; ok { - fmt.Println(name) - } -} - -// todo: note about use with errors