Hi All !

In case some one is in interest of the builder patterm industrial 
implementation.
So, I have found that there are a very intresting use the package  named 
https://github.com/spf13/cobra.
The package should be considered In context of the builder pattern 
implementation for realizaton of the template pattern to implement 
command/fasade pattern.
And to say everything above a little bit simpler: package is used to build 
CLI.
Sorry, English is not native for me. :-)

Thank you.

суббота, 3 апреля 2021 г. в 14:13:39 UTC+3, alex-coder: 

> Hi, 
> thank you for  everyone!
>
> The main point here is: "generally isn't needed", but sometimes structure 
> does not come described properly in some kind of string representation. :-)
> the pair Func / funchandler - just excellent ! 
> But what about other GO-4 patterns, I mean "isn't needed in go" ?
> Where take a look at ?
>
> Thank you.
>
> On Thursday, April 1, 2021 at 4:29:14 PM UTC+3 ren...@ix.netcom.com wrote:
>
>> The Go protobufs impl uses the builder pattern. 
>>
>> On Apr 1, 2021, at 2:21 AM, Brian Candler <b.ca...@pobox.com> wrote:
>>
>> The builder pattern generally isn't needed in go, because go has 
>> flexible struct literals where you can omit any members you don't want. 
>>
>>
>> You can implement it if you like, but it just adds a layer of boilerplate:
>> https://gist.github.com/vaskoz/10073335
>>
>> Some people are drawn to functional options instead:
>> https://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis
>>
>> https://www.calhoun.io/using-functional-options-instead-of-method-chaining-in-go/
>>
>> But if you look at the standard library as a source of inspiration and 
>> good practice, complex configuration is typically done via structs.  See 
>> for example http.Server <https://golang.org/pkg/net/http/#Server>
>>
>> -- 
>> 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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/golang-nuts/39e38cd7-93ee-4084-89e4-a22bcd1baaa6n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/golang-nuts/39e38cd7-93ee-4084-89e4-a22bcd1baaa6n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/88d9f62e-4a2f-4623-8f50-0fdbb33f58f9n%40googlegroups.com.

Reply via email to