[go-nuts] Re: func return with if... else...

2017-01-14 Thread Eric Brown
Thank you... On Saturday, January 14, 2017 at 4:44:33 PM UTC-6, Dave Cheney wrote: > > The former. -- 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+u

[go-nuts] Re: func return with if... else...

2017-01-14 Thread Dave Cheney
The former. -- 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.

[go-nuts] Re: func return with if... else...

2017-01-14 Thread Eric Brown
If you have a catch-all, is it better to use after an if condition without an else, or put it in an else: if condition { return A } return B or: if condition { return A } else { return B } Just curious is there is a prefered standard to this for readability, or if it's just to each

Re: [go-nuts] Re: func return with if... else...

2017-01-14 Thread Justin Israel
On Sun, Jan 15, 2017 at 10:37 AM Eric Brown wrote: > Sorry guys, found the issue... and it's from my inexperience. The > functions that is happening to are ones I used a switch condition (which I > could've used an if condition on instead). > > I used: > > switch strings.Contains(targetDatabase.

[go-nuts] Re: func return with if... else...

2017-01-14 Thread Eric Brown
Sorry guys, found the issue... and it's from my inexperience. The functions that is happening to are ones I used a switch condition (which I could've used an if condition on instead). I used: switch strings.Contains(targetDatabase.Driver, ConvertString("[!]sqlite[!]")) { case true: case false: