Standard library / fmt
fmt.Sprintln()
Returns default-formatted arguments separated by spaces, followed by a newline. Expected stdout: '"row 8\\n"\n'.
Formal Syntax & Structure
go syntaxgo
func Sprintln(a ...any) stringParameters & Attributes
| Name | Type | Description |
|---|---|---|
| a | ...any | Values consumed by formatting; may be empty. |
Return Value
string
Formatted text.
Working Example
Example Snippetgo
package main
import ( "fmt")
func main() { fmt.Printf("%q\n", fmt.Sprintln("row", 8))}