Created
January 23, 2019 06:34
-
-
Save cjgiridhar/bcc3d38652426666be59e656a6ac8e19 to your computer and use it in GitHub Desktop.
Primitive Data Types in Go - Strings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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