4 ms·
Could you just create well-named functions which call LibraryFunction() internally rather than relying on the caller to specify 1 or more default arguments?
by brobinson 10y ago
Could you just create well-named functions which call LibraryFunction() internally rather than relying on the caller to specify 1 or more default arguments?
- ben_jones 10y agoYeah. It's funny I'm currently working on two Go libraries one uses the convention you listed [1] and the other [2] uses nil pointers. [1]: https://github.com/b3ntly/go-sms/blob/master/client.go https://github.com/b3ntly/go-sms/blob/master/client.go [2]: https://github.com/b3ntly/mLock/blob/master/lock.go https://github.com/b3ntly/mLock/blob/master/lock.go Disclaimer: Both libraries are in the pre-alpha stages and are extremely light on tests and/or broken.