Sprintf and Sprintln


examples/sprintf/sprintf.go
package main

import (
    "fmt"
)

func main() {
    name := "Foo"
    res := fmt.Sprintf("Hello %s", name)
    fmt.Println("World")
    fmt.Print(res)
}


examples/sprintln/sprintln.go
package main

import (
    "fmt"
)

func main() {
    res := fmt.Sprintln("Hello")
    fmt.Println("World")
    fmt.Print(res)
}