Avatar ·

How to convert an integer (int) to a string in Go?

Hi everyone! I just started learning Go and ran into what seems like a simple task: I need to print a message that contains a number and text. For example, I want to get the string "Result: 42", where 42 is a variable of type int. In Python, I would simply write `"Result: " + str(42)`, and it would work. In Go, I tried doing this: ```go package main import "fmt" func main() { score := 42 message := "Result: " + score fmt.Println(message) } ``` But the compiler gives an error: `cannot use score (variable of type int) as type string in concatenation`. I understand that Go is a strongly typed language, but how do I convert an int to a string? I tried several options: 1. I tried using `string(score)`, but got the character "*" in the output