代码
package main
import (
"fmt"
)
func main() {
const name string = "Tom"
fmt.Println(name)
const age = 30
fmt.Println(age)
const name_1, name_2 string = "Tom", "Jay"
fmt.Println(name_1, name_2)
const name_3, age_1,aaa = "Tom", 30,true
fmt.Println(name_3, age_1,aaa)
}
输出结果
Tom
30
Tom Jay
Tom 30 true