String formatting
When formatting strings in Go, you can use the fmt package, which provides functions like fmt.Sprintf for returning formatted strings and fmt.Printf for printing formatted strings to the console.
There are various verbs you can use to format strings, such as:
%sfor strings%dfor integers%ffor floating-point numbers, e.g..2ffor two decimal places%vfor the default format of any value
name := "John"
age := 30
formattedString := fmt.Sprintf("My name is %s and I am %d years old.", name, age)
fmt.Println(formattedString) // Output: My name is John and I am 30 years old.