:)) ok let me show you in the following example: def sayHey(name="You"): print('Hey, {0}'.format(name))
sayHey() # Hey, You sayHey('John') # Hey, John but we don't have parameters default value like Python in Golang. if I want to do this action simply without using structs I should write the below dumb lines: func sayHey(name string) string { if name == "" { name = "You" } fmt.Sprintf("Hey, %s", name) } On Wednesday, August 22, 2018 at 5:56:55 PM UTC+4:30, Jan Mercl wrote: > > On Wed, Aug 22, 2018 at 3:20 PM Masoud Ghorbani <msud.g...@gmail.com > <javascript:>> wrote: > > > In my description, I used the argument title instead parameter, sorry > for this confusion. > > Now I'm lost in translation ;-) Can you please show some code illustrating > the topic? Like code written now vs code written while feature X would be > present? > > > -- > > -j > -- 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.