2022-12-03

This commit is contained in:
2022-12-03 18:29:02 +00:00
parent f559e0dc2a
commit ccbb0b2294
8 changed files with 122 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
// variables must be read at least once
// golangci-lint will warn but the compiler will allow it
// package level vars do not need to be read (another reason not to use them)
// constants do not need to be read, if they are not used they are excluded from the build
package main
import "fmt"
func main() {
x := 10
x = 20
fmt.Println(x)
x = 30
}