I don't know if its a good idea to have this in stdlib, but you can
definitely write your own to solve the problem :)
package main
import (
"fmt"
)
func Printfln(format string, a ...interface{}) {
fmt.Printf(format + "\n", a...)
}
func main() {
Printfln("%s is awesome!", "Go")
fmt.Println("yup")
}
On Wednesday, 23 May 2018 04:59:59 UTC+5:30, Anirudh Vyas wrote:
>
> I have a rather simple request - I am not sure if this already exists but
> I'd like to avoid typing "\n" everytime I do Printf( ) even though I quite
> enjoy doing that. Is there an inbuilt library function that does this?
>
> Thanks
> Anirudh
>
--
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].
For more options, visit https://groups.google.com/d/optout.