Idiomatic Design Patterns in Go : r/golang - Reddit
文章推薦指數: 80 %
62 votes, 10 comments. 165K subscribers in the golang community. Ask questions and post articles about the Go programming language and ... Foundtheinternet!65IdiomaticDesignPatternsinGo Close65Postedby3yearsagoIdiomaticDesignPatternsinGo twitter.com/ryan0x...10commentssharesavehidereport90%UpvotedLoginorsignuptoleaveacommentLogInSignUpSortby:best level1·3yr.agoLinktoslidesthemselves,insteadoftwitterlinktoslides...https://docs.google.com/presentation/d/1BzhCRi0VmOj-sJSqzxc1i5GyuNNQG3QPazzkP8NFf2g/edit34ReplyShareReportSaveFollowlevel2·3yr.agoTheherowedeserve7ReplyShareReportSaveFollowlevel1·3yr.agoIhaveaveryhardtimestructuringmygoprojects.IneverachievesomethingI'mcontentwiththatfeelsidiomatictogo.6ReplyShareReportSaveFollowlevel2Commentdeletedbyuser·3yr.agoContinuethisthread level1·3yr.agoIt'sgreattoseetheauthoruseappropriatetypenamesalloverthispresentation,especiallywithregardstousingthepackagenameforcontext.ThisissomethingIfeelalotofGopherscanstrugglewithwhencomingintoGo,sohavingmateriallikethisaroundisagreatreferenceforthosepeople.Thanksforsharing.6ReplyShareReportSaveFollowlevel1Op·3yr.agoFromGophercon2ReplyShareReportSaveFollowlevel1·3yr.agoIsn'tidiomaticwaytoIteratorthroughthechan?1ReplyShareReportSaveFollowlevel2·3yr.agoGenerallyspeaking,youdon'twanttohavechannelsinyourAPI,becausethatforcestheclienttothinkaboutchannelmechanics.Usually,youcangetawaywithabstractingthechannelaway,likeinthedatabase/sqlAPIorio.Pipe.Thentheydon'tneedtoworryaboutclosingthechannelorcheckingforittobedoneorracyconditions.2ReplyShareReportSaveFollowlevel2Op·3yr.agoIteratorsarepreferredacrossAPI/packageboundaries.1ReplyShareReportSaveFollowToppostsaugust28th2018Toppostsofaugust,2018Topposts2018helpRedditcoinsRedditpremiumRedditgiftsaboutcareerspressadvertiseblogTermsContentpolicyPrivacypolicyModpolicyRedditInc©2021.AllrightsreservedBacktoTop
延伸文章資訊
- 1All Design Patterns in Go (Golang)
A curated list of design patterns implemented in Go. ... in learning Golang, then for that we hav...
- 2Factory Method - Refactoring.Guru
Factory Method is a creational design pattern that provides an interface for creating objects in ...
- 3Three Productive Go Patterns to Put on Your Radar | Blog
Three Productive Go Patterns to Put on Your Radar · The Dependency Injection Pattern · The Client...
- 4Idiomatic Design Patterns in Go : r/golang - Reddit
62 votes, 10 comments. 165K subscribers in the golang community. Ask questions and post articles ...
- 5Curated list of Go design patterns, recipes and idioms - GitHub
Go Patterns build-status awesome license · Creational Patterns · Structural Patterns · Behavioral...