kk
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
module main.go
|
||||
|
||||
go 1.24.4
|
||||
@@ -0,0 +1,27 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
const (
|
||||
A = 10
|
||||
B = 11
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
var constInt8 int8 = A
|
||||
var constString string = strconv.Itoa(A)
|
||||
|
||||
fmt.Println("constInt8 is ",constInt8)
|
||||
fmt.Println("constString is ",constString)
|
||||
|
||||
}
|
||||
|
||||
func checkConst() {
|
||||
if A == 10 {
|
||||
fmt.Printf("a is 10\n")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user