String Data Type
Text in Go is held by the string type, which is simply a series of characters. To write a string value, put it between double quotes.
Example
Prompt
Declare string variables in three ways: typed with value, typed without value, and short declaration. Print the type and value of each.
Output: Go program and captured output
main.go
package main
import ("fmt")
func main() {
var txt1 string = "Hello!"
var txt2 string
txt3 := "World 1"
fmt.Printf("Type: %T, value: %v\n", txt1, txt1)
fmt.Printf("Type: %T, value: %v\n", txt2, txt2)
fmt.Printf("Type: %T, value: %v\n", txt3, txt3)
}