摘要:
backticks When using backticks (`) to make strings(Raw string literals), backslashes (\) don't have any special meaning and don't mark the beginning o 阅读全文
摘要:
rune与string The rune type in Go is an alias for int32. Given this underlying int32 type, the rune type holds a signed 32-bit integer value. However, u 阅读全文
摘要:
import "math/rand" n := rand.Intn(100) // n is a random int, 0 <= n < 100 f := rand.Float64() // f is a random float64, 0.0 <= f < 1.0 x := []string{" 阅读全文
摘要:
不需要手动break default是找不到case时执行 可以对多个case执行同样的操作 operatingSystem := "windows" switch operatingSystem { case "windows", "linux": // do something if the o 阅读全文