GOLANG学习7. 常量定义
package main
import (
"fmt"
"time"
)
const (
Male = 0
Female = 1
)
func main() {
secd := time.Now().Unix()
if secd%2 == Male {
fmt.Println("Male")
} else {
fmt.Println("Female")
}
}
其实我一直在你身边
package main
import (
"fmt"
"time"
)
const (
Male = 0
Female = 1
)
func main() {
secd := time.Now().Unix()
if secd%2 == Male {
fmt.Println("Male")
} else {
fmt.Println("Female")
}
}