Skip to content

Instantly share code, notes, and snippets.

@hi-manshu
Created July 12, 2018 14:48
Show Gist options
  • Save hi-manshu/6413e7772b56d8a877689e66d866264a to your computer and use it in GitHub Desktop.
Save hi-manshu/6413e7772b56d8a877689e66d866264a to your computer and use it in GitHub Desktop.
// this is how we declare the Boolean Varibales in go
// Here isMyNameHimanshu variable is declared specifing a data-type
var isMyNameHimanshu bool = true
// Here isMyNameHimanshu variable is declared without specifing a data-type
var isMyNameHimanshu = true
//here the varibale is declared without using the var keyword
isMyNameHimanshu:= true
//Output after running go run booleanExample.go
>> fmt.Println(isMyNameHimanshu)
>> true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment