摘要:
rand.Intn()用法和猜年龄 package main import ( "fmt" "math/rand" "time" ) func init() { rand.Seed(time.Now().UnixNano()) } func main() { target := rand.Intn( 阅读全文
摘要:
点击查看代码 package main import ( "fmt" "time" ) func fibonacci(n int) uint64 { if n <= 2 { return uint64(1) } return fibonacci(n - 1) + fibonacci(n - 2) } 阅读全文
摘要:
疑问 str = "httpsh://" fmt.Println("???",strings.TrimLeft(str, "https")) // 输出:// 而不是h:// package main import ( "fmt" "strings" ) func main() { var str1 阅读全文