PHP
·
发表于 5年以前
·
阅读量:8295
import (
"log"
"strconv"
)
func test(){
httpStatus := 8080
str := strconv.Itoa(httpStatus)
log.Println(str)
}
import (
"log"
"strconv"
)
func test(){
int64Val := 8080
str := strconv.FormatInt(int64Val,10)
log.Println(str)
}
import (
"log"
"strconv"
)
func test(){
strPort := "8080"
intVal, err := strconv.Atoi(strPort)
}
import (
"log"
"strconv"
)
func test(){
strPort := "8080"
intVal, err := strconv.ParseInt(strPort,10,64)
}