1

In python strings can be created in a manner of "%s times %d is %s" % ('money', 2, 'something') == 'money times 2 is something'

And then in golang samples there is quite in few places (from http example):

fmt.Printf("%s %s %s\n", r.RemoteAddr, r.Method, r.URL)

So from first sight it appears similar but that's just for console output. What about constructing strings to pass somewhere? Can something like this be used inline as in manner of: http.ListenAndServe("%s:%s", op.Host, op.Port, Log(http.DefaultServeMux))

P.S. maybe there is any good reads for python to golang?

JackLeo
  • 4,579
  • 9
  • 40
  • 66

0 Answers0