This commit is contained in:
a.pivkin
2025-07-11 15:14:40 +03:00
parent 31515dba8d
commit f7620b40f3
10 changed files with 119 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
module main.go
go 1.24.4
+27
View File
@@ -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")
}
}