mirror of
https://github.com/MADTeacher/go_basics.git
synced 2025-11-23 21:34:47 +02:00
18 lines
261 B
Go
18 lines
261 B
Go
package main
|
|
|
|
import "fmt"
|
|
|
|
func main() {
|
|
myBool := true
|
|
var value int
|
|
if myBool {
|
|
value = 1
|
|
} else {
|
|
value = 0
|
|
}
|
|
fmt.Println("Value = ", value) // Value = 1
|
|
|
|
myBool2 := value == 1
|
|
fmt.Println("myBool2 value = ", myBool2) // myBool2 value = true
|
|
}
|