Hello Betsy There is no "passing optional arguments by name" in go.
This link [1] has an overview what what can or can't be done for optional params : - the *Functional options* technique. - or you may define a struct as parameter, then call it with only the fields you're interested in : [2] This implies that "the zero values must be meaningful (i.e. acceptable in your context : nil, 0, etc.)" things := Things{amount: 13} show(things) [1] http://stackoverflow.com/questions/2032149/optional-parameters [2] https://play.golang.org/p/yiKzomwTKM On Tuesday, December 13, 2016 at 6:46:23 AM UTC+1, bet...@google.com wrote: > > Hi, > > In Python, I can include params like this: > > ===================== > > *params = {'auth': 'XXXXXXXX'}* > > response = requests.request("GET", url, data=payload, headers=headers, > *params=params*) > > ===================== > > Any pointers on how Golang does this? > > Thanks, > Betsy > -- 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 golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.