Re: [go-nuts] Re: Guidance on exposing functionality

2017-06-06 Thread Michael Jones
sometimes you can write the simple one in terms of the advanced one. when you can do that, it makes them better and also educational. On Tue, Jun 6, 2017 at 7:09 PM, peterGo wrote: > M2, > > The Go strconv package (https://golang.org/pkg/strconv/) contains the > simple forms Atoi and Itoa and th

[go-nuts] Re: Guidance on exposing functionality

2017-06-06 Thread peterGo
M2, The Go strconv package (https://golang.org/pkg/strconv/) contains the simple forms Atoi and Itoa and the complex forms ParseInt and FormatInt. In the documentation for each function refer to the alternate form. Peter On Tuesday, June 6, 2017 at 3:56:43 PM UTC-4, M2 wrote: > > I need to exp

[go-nuts] Re: Guidance on exposing functionality

2017-06-06 Thread M2
Thanks for taking the time to respond. This is how I was thinking also. I am trying to gather what is the most common approach in Go community to avoid "surprising" my users. If anyone has an opinion please feel free to chime in. Thanks again On Tuesday, June 6, 2017 at 1:43:57 PM UTC-7, Matt

[go-nuts] Re: Guidance on exposing functionality

2017-06-06 Thread Matt Layher
Approach number one is the correct way, IMO. That's what I've always done: https://godoc.org/github.com/mdlayher/netlink#Conn.Execute. - Matt On Tuesday, June 6, 2017 at 3:56:43 PM UTC-4, M2 wrote: > > I need to expose 2 ways of doing the same thing. > > - The first way is very simple, always d