增加带变量初始化的if语句

pull/82/head
Rain Miao 3 years ago committed by GitHub
parent e53a5b9745
commit d85dd833ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -149,6 +149,11 @@ if i == 10 {
} else {
println("i != 10")
}
// if with init
m := map[int]int{1:1}
if v, ok := m[1]; ok {
println(v)
}
// switch
switch i {
case 10:

Loading…
Cancel
Save