inputParagraph.Text = fmt.Scanf("%s", input) // Error: assignment
mismatch: 1 variable but fmt.Scanf returns 2 values
The error message is clear: fmt.Scanf returns two values (BTW, neither of
them is the value extracted). Check the documentation for fmt.Scanf here:
https://golang.org/pkg/fmt/#Scanf
https://golang.org/pkg/fmt/#hdr-Scanning
https://golang.org/pkg/fmt/#example_Sscanf
outputParagraph.Text += fmt.Printf("The string you entered is: %s", input)
// multiple-value fmt.Printf() in single-value context
In this case you want fmt.Sprintf instead:
https://golang.org/pkg/fmt/#Sprintf
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/c6dc6c49-b18b-4655-b206-7227e1fdb7d1%40googlegroups.com.