Hello Bar - Printf %v
- Printf
- %v
In some case it is better to use %v as it is type-agnostic. We're going to use it more often during the rest of these pages.
package main
import (
"fmt"
)
func main() {
name := "Bar"
fmt.Printf("Hello %v\n", name)
}
Hello Bar