Design Patterns for Go? : r/golang - Reddit

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

Google around for dependency injection. There are several articles out there, and this design pattern should be #1 in your list of learning and becoming ... Foundtheinternet!18DesignPatternsforGo? Close18Postedby7yearsagoDesignPatternsforGo? Orbestpracticestodevelopdifferenttypesofapplications?6commentssharesavehidereport83%UpvotedLoginorsignuptoleaveacommentLogInSignUpSortby:best level1·7yr.agoBestpractices:https://golang.org/doc/effective_go.html14ReplyShareReportSaveFollowlevel2·7yr.agoThisisgoodforverybasicdesignpatterns,butnotsomuchforlargerconcepts.It'sagoodideatoreadthesource-codeofthestandardlibrary,whichhasalotofgoodpatterns.Theofficialgolangbloghasalotofgoodstufftoo.8ReplyShareReportSaveFollowContinuethisthread level1·7yr.agoGooglearoundfordependencyinjection.Thereareseveralarticlesoutthere,andthisdesignpatternshouldbe#1inyourlistoflearningandbecomingproficientin.Ireallyliketheencoding/base64packageasanexampleofaveryusableandsimplepackagetomodelafter.IreallyliketheuseoftheDefaultEncodervariables,andthesupportingcode.Itisalldefaultedtousablesettings,andcanbeeasilycustomizedforanyone'sneeds.7ReplyShareReportSaveFollowlevel1·7yr.agoIcameacrossthispaperawhileago:http://ecs.victoria.ac.nz/foswiki/pub/Main/TechnicalReportSeries/ECSTR11-01.pdfItmightnotbewhatyouarelookingforbutitcouldbeinterestingifyoucomefromanobjectorientedbackground.BasicallytheytakeallthestandardGoFdesignpatternsandimplementthemwithGo.Ithoughitwasjustinterestingtoseehowtheyaccomplishedsomeofthesepatternsbyleveragingthefeaturesofthelanguage.5ReplyShareReportSaveFollowlevel2Op·7yr.agoGreatstuff,reallyexactlywhatIwaslookingfor!Thanks!2ReplyShareReportSaveFollowr/golangAskquestionsandpostarticlesabouttheGoprogramminglanguageandrelatedtools,eventsetc.165kMembers460OnlineCreatedNov11,2009JoinToppostsaugust30th2014Toppostsofaugust,2014Topposts2014helpRedditcoinsRedditpremiumRedditgiftsaboutcareerspressadvertiseblogTermsContentpolicyPrivacypolicyModpolicyRedditInc©2021.AllrightsreservedBacktoTop



請為這篇文章評分?