// gover.go
package main
import (
"fmt"
"runtime"
"strings"
)
func main() {
b := strings.Compare(runtime.Version(), "go1.8")
fmt.Println(b, runtime.Version())
}
输出结果:
0 go1.8
// gover.go
package main
import (
"fmt"
"runtime"
"strings"
)
func main() {
b := strings.Compare(runtime.Version(), "go1.8")
fmt.Println(b, runtime.Version())
}
输出结果:
0 go1.8
转载于:https://my.oschina.net/tsh/blog/894352