prnt

a package to bring python like print formatting to golang

Examples:

func main() {
	age := 12
	name := "ofer"
	height := 184.5
  prnt.Prntstr("age = {0}, name = {1}, height = {2}", age, name, height)

Output:

age = 12, name = ofer, height = 184.5

func main() {
  p1 := Person{
      Name: "Warren",
      Age:  31,
      Addr: Address{
        City:    "Denver",
        State:   "CO",
        Country: "U.S.A.",
      },
    }
  prnt.Prntstr("\nPerson: {0}", p1)

Output:

Person: {Warren 31 {Denver CO U.S.A.}}

GitHub

View Github