Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.