drop ok-guards for now
This commit is contained in:
parent
6e5585ff65
commit
9e8d0127d4
@ -20,7 +20,6 @@ Methods
|
||||
# Interfaces
|
||||
# Embedding
|
||||
# Errors
|
||||
# OK Guards
|
||||
Goroutines
|
||||
Channels
|
||||
Channel Buffering
|
||||
|
@ -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
|
Loading…
x
Reference in New Issue
Block a user