go fmt.print code example
Example 1: go format string
s := fmt.Sprintf("string: %s number: %d time: %v", "string", 1, time.Now())
Example 2: golang how to print message
Package main
import "fmt"
main func(
fmt.Println("hello-world!")
)
s := fmt.Sprintf("string: %s number: %d time: %v", "string", 1, time.Now())
Package main
import "fmt"
main func(
fmt.Println("hello-world!")
)