Idiomatic Design Patterns in Go : r/golang - Reddit

文章推薦指數: 80 %
投票人數:10人

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



請為這篇文章評分?