Skip to content

Instantly share code, notes, and snippets.

@prondubuisi
Created June 27, 2020 02:19
Show Gist options
  • Save prondubuisi/bc8800f4e2b892404456335f109ea7e2 to your computer and use it in GitHub Desktop.
Save prondubuisi/bc8800f4e2b892404456335f109ea7e2 to your computer and use it in GitHub Desktop.
Variable Declaration in Go
package main
import (
"fmt"
)
var message string = "Hello"
var num1, num2 int = 1, 2
var a = "initial"
var average float32
func main() {
print(average)
average = 6.4
isValid := true
fmt.Println(message, num1, num2, average)
fmt.Println(a)
fmt.Println(isValid)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment