- Printf
- %v
Hello Bar - 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.
examples/hello-foo-printf-v/hello_foo_printf_v.go
package main import ( "fmt" ) func main() { name := "Bar" fmt.Printf("Hello %v\n", name) }
Hello Bar