how to print in golang code example
Example 1: print in golang
package Main
import ("fmt")
func main(){
fmt.Print("this message will be printed without a linefeed at the end")
fmt.Println("this message will be printed with a linefeed a the end")
fmt.Printf("You can also use %s formatings with Printf \n (PS : this message won't end with a line feed)","multiples")
}
Example 2: format string go
fmt.Sprintf("foo: %s", bar)
Example 3: golang how to print message
Package main
import "fmt"
main func(
fmt.Println("hello-world!")
)