Skip to content

Instantly share code, notes, and snippets.

@cjgiridhar
Created January 23, 2019 06:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cjgiridhar/bcc3d38652426666be59e656a6ac8e19 to your computer and use it in GitHub Desktop.
Save cjgiridhar/bcc3d38652426666be59e656a6ac8e19 to your computer and use it in GitHub Desktop.
Primitive Data Types in Go - Strings
package main
import "fmt"
func aStr() {
mstr1, mstr2 := "Hi", "Go!"
fmt.Printf("%s %s", mstr1, mstr2)
}
func main() {
var mystr string
var mstr = "Chetan"
fmt.Printf("%s %s", mystr, mstr)
aStr()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment