{"version":3,"sources":["webpack:///./src/assets/images/cyclo_complexity.png","webpack:///./src/assets/images/edge_nodes.png","webpack:///./src/assets/images/nested_statement_2.png","webpack:///./src/views/Chap41DesignRecommendations.vue?b7a7","webpack:///src/views/Chap41DesignRecommendations.vue","webpack:///./src/views/Chap41DesignRecommendations.vue?44b5","webpack:///./src/views/Chap41DesignRecommendations.vue","webpack:///./src/assets/images/interface_implementation.png","webpack:///./src/assets/images/nested_stetements.png","webpack:///./src/assets/images/advice_sources.png"],"names":["module","exports","render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","_v","directives","name","rawName","pre","staticStyle","staticRenderFns","components","FeedbackInvite","BuyCopyInvite","NewsletterInput","ChapterHeading","ChapterBibliography","TOCChapter","NavBar","BIconLink45deg","Footer","mounted","i","mathElements","length","tagName","window","displayMode","throwOnError","macros","fleqn","created","data","publicPath","metaInfo","title","htmlAttrs","lang","meta","charset","content","property","link","rel","href","component"],"mappings":"qGAAAA,EAAOC,QAAU,IAA0B,qC,qBCA3CD,EAAOC,QAAU,IAA0B,+B,qBCA3CD,EAAOC,QAAU,IAA0B,uC,yCCA3C,IAAIC,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACA,EAAG,UAAUA,EAAG,MAAM,CAACE,YAAY,mBAAmB,CAACF,EAAG,QAAQ,CAACA,EAAG,aAAa,CAACG,MAAM,CAAC,aAAa,iCAAiCH,EAAG,SAASA,EAAG,QAAQ,CAACG,MAAM,CAAC,KAAO,OAAO,GAAK,MAAM,CAACH,EAAG,iBAAiB,CAACG,MAAM,CAAC,gBAAgB,qCAAqC,aAAa,aAAa,YAAY,4BAA4BH,EAAG,MAAM,CAACE,YAAY,SAASC,MAAM,CAAC,GAAK,yCAAyCH,EAAG,KAAK,CAACG,MAAM,CAAC,cAAc,MAAM,CAACH,EAAG,OAAO,CAACE,YAAY,yBAAyB,CAACN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,CACMC,KAANA,MAEIC,KAAJA,CACA,CAAMC,QAANA,SACA,CAAMjC,KAANA,cAAMkC,QAANA,GACA,CAAMlC,KAANA,SAAMkC,QAANA,iBACA,CAAMC,SAANA,YAAMD,QAANA,SACA,CAAMC,SAANA,UAAMD,QAANA,WACA,CAAMC,SAANA,WAAMD,QAANA,GACA,CAAMC,SAANA,iBAAMD,QAANA,GACA,CAAMC,SAANA,SAAMD,QAANA,sBACA,CAAMC,SAANA,eAAMD,QAANA,wBACA,CAAMC,SAANA,eAAMD,QAANA,uBACA,CAAMC,SAANA,kBAAMD,QAANA,mBAEIE,KAAJA,CACA,CAAMC,IAANA,YAAMC,KAANA,yBC31BqW,I,YCOjWC,EAAY,eACd,EACAlD,EACAe,GACA,EACA,KACA,WACA,MAIa,aAAAmC,E,gCClBfpD,EAAOC,QAAU,IAA0B,6C,sBCA3CD,EAAOC,QAAU,IAA0B,sC,uBCA3CD,EAAOC,QAAU,IAA0B","file":"js/chunk-293066ec.067b63ec.js","sourcesContent":["module.exports = __webpack_public_path__ + \"img/cyclo_complexity.a4f7ffbc.png\";","module.exports = __webpack_public_path__ + \"img/edge_nodes.a895b46e.png\";","module.exports = __webpack_public_path__ + \"img/nested_statement_2.103058c3.png\";","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('NavBar'),_c('div',{staticClass:\"container-fluid\"},[_c('b-row',[_c('TOCChapter',{attrs:{\"chapter-id\":\"Chap41DesignRecommendations\"}}),_c('b-col'),_c('b-col',{attrs:{\"role\":\"main\",\"md\":\"6\"}},[_c('ChapterHeading',{attrs:{\"chapter-title\":\"Chapter 41: Design Recommendations\",\"image-name\":\"design.jpg\",\"image-alt\":\"Design Recommendations\"}}),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"what-will-you-learn-in-this-chapter\"}}),_c('h1',{attrs:{\"data-number\":\"1\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"1\")]),_vm._v(\" What will you learn in this chapter? \"),_c('a',{attrs:{\"href\":\"#what-will-you-learn-in-this-chapter\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('ul',[_c('li',[_vm._v(\"We will detail some practical design advice to improve your code.\")])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"technical-concepts-covered\"}}),_c('h1',{attrs:{\"data-number\":\"2\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"2\")]),_vm._v(\" Technical concepts covered \"),_c('a',{attrs:{\"href\":\"#technical-concepts-covered\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('ul',[_c('li',[_c('p',[_vm._v(\"package\")])]),_c('li',[_c('p',[_vm._v(\"interface\")])]),_c('li',[_c('p',[_vm._v(\"method\")])]),_c('li',[_c('p',[_vm._v(\"receiver\")])]),_c('li',[_c('p',[_vm._v(\"cyclomatic complexity\")])]),_c('li',[_c('p',[_vm._v(\"Halstead metrics\")])])]),_c('h1',{staticClass:\"unnumbered\",attrs:{\"id\":\"introduction\"}},[_vm._v(\"Introduction\")]),_c('p',[_vm._v(\"This chapter will try to answer the question “how do I design my Go code?”. As a new Go developer from other languages, I asked myself this question during my beginnings. When you write software for your only use, this question is not important. When you work in a team, you have to follow conventions and best practices.\")]),_c('p',[_vm._v(\"I have read popular blog posts written by Go developers to write this chapter. My objective in this chapter is to compile those bits of advice. Do not follow them religiously. Keep in mind that each project is different.\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"package-names\"}}),_c('BuyCopyInvite'),_c('h1',{attrs:{\"data-number\":\"3\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"3\")]),_vm._v(\" Package names \"),_c('a',{attrs:{\"href\":\"#package-names\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"Packages names are exposed to package users. Therefore they must be chosen with attention by developers. What does it means when I say exposed to users ? It means that when somebody wants to use the function Bar of your package, he has to write :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"pkgName.Bar()\")])]),_c('p',[_vm._v(\"Here are some standard rules that we can follow\")]),_c('p',[_vm._v(\"Sources : \"),_c('b-link',{staticClass:\"citation\",attrs:{\"data-cites\":\"dave-design\",\"href\":\"#dave-design\"}},[_vm._v(\"[@dave-design]\")])],1),_c('p',[_c('b-link',{staticClass:\"citation\",attrs:{\"data-cites\":\"ds-design\",\"href\":\"#ds-design\"}},[_vm._v(\"[@ds-design]\")])],1),_c('table',[_c('caption',[_vm._v(\"Package Names recommendations\")]),_c('thead',[_c('tr',{staticClass:\"header\"},[_c('th',{staticStyle:{\"text-align\":\"center\"}},[_vm._v(\"Advice\")])])]),_c('tbody',[_c('tr',{staticClass:\"odd\"},[_c('td',{staticStyle:{\"text-align\":\"center\"}},[_vm._v(\"Short: no more than one word\")])]),_c('tr',{staticClass:\"even\"},[_c('td',{staticStyle:{\"text-align\":\"center\"}},[_vm._v(\"No plural\")])]),_c('tr',{staticClass:\"odd\"},[_c('td',{staticStyle:{\"text-align\":\"center\"}},[_vm._v(\"Lower case\")])]),_c('tr',{staticClass:\"even\"},[_c('td',{staticStyle:{\"text-align\":\"center\"}},[_vm._v(\"Informative about the service it gives\")])]),_c('tr',{staticClass:\"odd\"},[_c('td',{staticStyle:{\"text-align\":\"center\"}},[_vm._v(\"No utility packages\")])])])]),_c('ul',[_c('li',[_c('p',[_c('u',[_vm._v(\"Examples\")])]),_c('ul',[_c('li',[_c('p',[_c('strong',[_vm._v(\"net\")]),_vm._v(\" very short, no plural, all lowercase, immediately we know that this package contains networking functionalities.\")])]),_c('li',[_c('p',[_c('strong',[_vm._v(\"os\")])])])])]),_c('li',[_c('p',[_c('u',[_vm._v(\"Counterexamples\")])]),_c('ul',[_c('li',[_c('p',[_c('strong',[_vm._v(\"models\")]),_vm._v(\": signals a package that is only here to support type struct that defines a data model. The service it gives is not clear (except that it gather data models). For instance, we could have a user package that will hold the user model and functionalities related to users.\")])]),_c('li',[_c('p',[_c('strong',[_vm._v(\"userManagement\")]),_vm._v(\" : it’s not a single word. We will use it to manage the users of the application , but in my opinion, those functionalities should live in a “user” package (with methods with a pointer to the User type as receivers).\")])]),_c('li',[_c('p',[_c('strong',[_vm._v(\"utils\")]),_vm._v(\" : this package generally hold function used in other packages. Therefore it’s advised to move the functions directly in the packages where they are used \"),_c('b-link',{staticClass:\"citation\",attrs:{\"data-cites\":\"dave-design\",\"href\":\"#dave-design\"}},[_vm._v(\"[@dave-design]\")])],1)])])]),_c('li',[_c('p',[_c('strong',[_vm._v(\"About utility packages\")]),_vm._v(\" : having a utils package might seem legit for developers coming from other languages, but for gophers, it does not make sense because it will necessarily mix functions that could have been inserted directly where they are used. It’s some kind of reflex that we have at the beginning of a project to put in this kind of package functions that could be useful elsewhere. But utilities are not prohibited. The standard Go library exposes utility functions but tends to group them by type. For instance \"),_c('strong',[_vm._v(\"strings\")]),_vm._v(\" or \"),_c('strong',[_vm._v(\"bytes\")]),_vm._v(\".\")])])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"use-interfaces\"}}),_c('h1',{attrs:{\"data-number\":\"4\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"4\")]),_vm._v(\" Use interfaces \"),_c('a',{attrs:{\"href\":\"#use-interfaces\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"Interfaces define behaviors. Based on this definition of behaviors, you can define multiple implementations of behaviors (see \"),_c('a',{attrs:{\"href\":\"#fig:Interface-and-implementations\",\"data-reference-type\":\"ref\",\"data-reference\":\"fig:Interface-and-implementations\"}},[_vm._v(\"1\")]),_vm._v(\"). Users of your package are not interested in your implementation. They just care about the service you give them. An interface defines a contract for the use of your public API. The implementation might change. For instance, you can improve the performance of the implementation of your method. Even if you change drastically how your package does what it does, the way to call it will remain stable.\")]),_c('figure',[_c('b-img',{staticClass:\"img-book\",attrs:{\"src\":require('@/assets/images/interface_implementation.png'),\"alt\":\"Interface and implementations[fig:Interface-and-implementations]\",\"fluid\":\"\",\"thumbnail\":\"\"}}),_c('figcaption',{attrs:{\"aria-hidden\":\"true\"}},[_vm._v(\"Interface and implementations\"),_c('span',{attrs:{\"id\":\"fig:Interface-and-implementations\",\"label\":\"fig:Interface-and-implementations\"}},[_vm._v(\"[fig:Interface-and-implementations]\")])])],1),_c('p',[_vm._v(\"With Go, an interface is a special kind of type. You can use it as a function or method argument.\")]),_c('table',[_c('caption',[_vm._v(\"Interfaces usage pieces of advice\")]),_c('thead',[_c('tr',{staticClass:\"header\"},[_c('th',{staticStyle:{\"text-align\":\"center\"}},[_vm._v(\"Advice\")])])]),_c('tbody',[_c('tr',{staticClass:\"odd\"},[_c('td',{staticStyle:{\"text-align\":\"center\"}},[_vm._v(\"Use interfaces as function/method arguments & as field types\")])]),_c('tr',{staticClass:\"even\"},[_c('td',{staticStyle:{\"text-align\":\"center\"}},[_vm._v(\"Small interfaces are better\")])])])]),_c('ul',[_c('li',[_c('strong',[_vm._v(\"Interfaces can be used as arguments in method and functions\")]),_vm._v(\" (remember that they are also types). By accepting an interface as an argument, you highlight the fact that inside you function, you will only use the behaviors defined by the interface.\")])]),_c('p',[_vm._v(\"To better understand, let’s take an example. Imagine building a new fancy cryptographic algorithm to exchange messages with a friend secretly.\")]),_c('p',[_vm._v(\"You will need to develop a function to decrypt messages (and to encrypt them). In the next listing, you can see your first attempt (\"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"Decrypt1\")])]),_vm._v(\") :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"func Decrypt1(b []byte) ([]byte, error) {\\n //...\\n}\")])]),_c('p',[_vm._v(\"It takes a slice of bytes as argument and returns a slice of bytes and an error. There is nothing bad with this function except that we can only use it with a slice of bytes as input. Imagine that instead of a slice of byte, you want to decrypt a whole file with this method? You will need to read all bytes from the file and pass it to the \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"Decrypt1\")])]),_vm._v(\" function.\")]),_c('p',[_vm._v(\"We have to find a type that will make our \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"Decrypt1\")])]),_vm._v(\" function more generic. The type interface that will serve this purpose is \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"io.Reader\")])]),_vm._v(\". Many types in the standard library implement this interface:\")]),_c('ul',[_c('li',[_c('p',[_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"os.File\")])])])]),_c('li',[_c('p',[_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"net.TCPConn\")])])])]),_c('li',[_c('p',[_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"net.UDPConn\")])])])]),_c('li',[_c('p',[_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"net.UnixConn\")])])])])]),_c('p',[_vm._v(\"If you accept an \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"io.Reader\")])]),_vm._v(\" as parameter, you can decrypt files, but also use it with data transmitted through TCP or UDP. Here is the second version of the function :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"func Decrypt2(r io.Reader) ([]byte, error) {\\n //...\\n}\")])]),_c('p',[_vm._v(\"The \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"io.Reader\")])]),_vm._v(\" interface define one Behaviour, \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"Read\")])]),_vm._v(\". A type that implements the \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"Read\")])]),_vm._v(\" function as defined in the interface \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"io.Reader\")])]),_vm._v(\" is an \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"io.Reader\")])]),_vm._v(\".\")]),_c('p',[_vm._v(\"It means that our \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"Decrypt2\")])]),_vm._v(\" function can take any type that implements the io.Reader interface.\")]),_c('ul',[_c('li',[_c('strong',[_vm._v(\"Small interfaces are better\")])])]),_c('p',[_vm._v(\"If we take, for example, the interfaces of the standard Go library, you can notice that they are often very small. The number of behaviors defines the size of an interface (in other words, the number of method signatures specified).\")]),_c('p',[_vm._v(\"In Go, you do not need to specify that a type implements an interface. Consequently, when your interface is composed of many behaviors, it’s hard to see which types implement the interface. That’s why small interfaces are easier to handle in the day-to-day programmer’s life.\")]),_c('p',[_vm._v(\"You can note that many interfaces are composed of 2-3 methods in Go standard library. Let’s take the example of the two famous io.Reader and io.Writer :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"type Reader interface {\\n Read(p []byte) (n int, err error)\\n}\\ntype Writer interface {\\n Write(p []byte) (n int, err error)\\n}\")])]),_c('p',[_vm._v(\"Here is a counter-example :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"type Bad interface {\\n Foo(string) error\\n Bar(string) error\\n Baz([]byte) error\\n Bal(string, io.Closer) error\\n Cux()\\n Corge()\\n Corege3()\\n}\")])]),_c('p',[_vm._v(\"The interface \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"Bad\")])]),_vm._v(\" is hard to implement. Someone that wants to implement it will need to develop seven methods! If you plan to build a widely used package, you make it difficult to newcomers to use your abstractions.\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"source-files\"}}),_c('h1',{attrs:{\"data-number\":\"5\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"5\")]),_vm._v(\" Source files \"),_c('a',{attrs:{\"href\":\"#source-files\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"A package can be composed of a single file. That’s perfectly legal, but if your file has more than 600 lines\"),_c('a',{staticClass:\"footnote-ref\",attrs:{\"href\":\"#fn1\",\"id\":\"fnref1\",\"role\":\"doc-noteref\"}},[_c('sup',[_vm._v(\"1\")])]),_vm._v(\", it can become difficult to read. Here are some practical pieces of advice to improve the readability of your sources.\")]),_c('table',[_c('caption',[_vm._v(\"Source files recommendations (\"),_c('b-link',{staticClass:\"citation\",attrs:{\"data-cites\":\"dave-design\",\"href\":\"#dave-design\"}},[_vm._v(\"[@dave-design]\")]),_vm._v(\")\")],1),_c('thead',[_c('tr',{staticClass:\"header\"},[_c('th',{staticStyle:{\"text-align\":\"center\"}},[_vm._v(\"Advice\")])])]),_c('tbody',[_c('tr',{staticClass:\"odd\"},[_c('td',{staticStyle:{\"text-align\":\"center\"}},[_vm._v(\"You should name one file like the package\")])]),_c('tr',{staticClass:\"even\"},[_c('td',{staticStyle:{\"text-align\":\"center\"}},[_vm._v(\"No more than 600 lines per file\")])]),_c('tr',{staticClass:\"odd\"},[_c('td',{staticStyle:{\"text-align\":\"center\"}},[_vm._v(\"One file = One responsibility\")])])])]),_c('figure',[_c('b-img',{staticClass:\"img-book\",attrs:{\"src\":require('@/assets/images/advice_sources.png'),\"alt\":\"Source file recommendations[fig:Source-file-advices]\",\"fluid\":\"\",\"thumbnail\":\"\"}}),_c('figcaption',{attrs:{\"aria-hidden\":\"true\"}},[_vm._v(\"Source file recommendations\"),_c('span',{attrs:{\"id\":\"fig:Source-file-advices\",\"label\":\"fig:Source-file-advices\"}},[_vm._v(\"[fig:Source-file-advices]\")])])],1),_c('ul',[_c('li',[_c('p',[_c('strong',[_vm._v(\"One file should be named like the package :\")]),_vm._v(\" if you have multiple files in your package it’s better to name a file like the package. For instance, in figure \"),_c('a',{attrs:{\"href\":\"#fig:Source-file-advices\",\"data-reference-type\":\"ref\",\"data-reference\":\"fig:Source-file-advices\"}},[_vm._v(\"2\")]),_vm._v(\" you can see that we have two packages: fruit and bike. In the fruit package, we have a fruit.go, and in the bike package, we have a bike.go source file. Those files can support shared types, interfaces, and constants common to all fruits (or bikes).\")])]),_c('li',[_c('p',[_c('strong',[_vm._v(\"No more than 600 lines per file :\")]),_vm._v(\" this advice will improve your program/package readability. Files should be short (but not too short); it will make the life of maintainers easier (scrolling over long files can be boring). Note that this limit is arbitrary; you can, of course, adapt it to your standards.\")])]),_c('li',[_c('p',[_c('strong',[_vm._v(\"One file = One responsibility :\")]),_vm._v(\" imagine that you are part of the go developers team, and you have been assigned to the correction of a nasty bug. On the GitHub issue, the user is complaining about the way cookies are handled by the HTTP client. You will have to find where the cookies are managed. With no surprise, cookies are managed in the file \"),_c('strong',[_vm._v(\"net/http/cookie.go\")]),_vm._v(\". This naming convention allows developers to locate source code responsibilities easily.\")])])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"error-handling\"}}),_c('h1',{attrs:{\"data-number\":\"6\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"6\")]),_vm._v(\" Error Handling \"),_c('a',{attrs:{\"href\":\"#error-handling\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"Errors and problems are part of the programming game. Your program has to handle all errors that might happen. As a programmer, you must think about the worst. Ask yourself what could go wrong in that line? What techniques could employ an evil user to make your program fail?\")]),_c('table',[_c('caption',[_vm._v(\"Error Handling recommendations\")]),_c('thead',[_c('tr',{staticClass:\"header\"},[_c('th',{staticStyle:{\"text-align\":\"center\"}},[_vm._v(\"Advice\")])])]),_c('tbody',[_c('tr',{staticClass:\"odd\"},[_c('td',{staticStyle:{\"text-align\":\"center\"}},[_vm._v(\"Always add context to errors\")])]),_c('tr',{staticClass:\"even\"},[_c('td',{staticStyle:{\"text-align\":\"center\"}},[_vm._v(\"Never ignore errors\")])]),_c('tr',{staticClass:\"odd\"},[_c('td',{staticStyle:{\"text-align\":\"center\"}},[_vm._v(\"Use fatal errors carefully\")])]),_c('tr',{staticClass:\"even\"},[_c('td',{staticStyle:{\"text-align\":\"center\"}},[_vm._v(\"Create fault-tolerant programs\")])])])]),_c('ul',[_c('li',[_c('strong',[_vm._v(\"Always add context to errors\")]),_vm._v(\" : when creating errors, you should give enough information to users (but also to the team that will operate maintenance on your application). Errors without context are harder to understand, and finding their origin in sources can be challenging.\")])]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"func main() {\\n err := foo(\\\"test\\\")\\n if err != nil {\\n fmt.Println(err)\\n }\\n}\\n\\nfunc foo(bar string) error {\\n err := baz()\\n if err != nil {\\n return err\\n }\\n return nil\\n}\\n\\nfunc baz() error {\\n return corge()\\n}\\n\\nfunc corge() error {\\n _, err := ioutil.ReadFile(\\\"/my/imagination.go\\\")\\n if err != nil {\\n return err\\n }\\n return nil\\n}\\n\\nfunc looping() ([]byte, error) {\\n return ioutil.ReadFile(\\\"/my/imagination.go\\\")\\n}\")])]),_c('p',[_vm._v(\"In this small example, we have created three function \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"foo\")])]),_vm._v(\", \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"baz\")])]),_vm._v(\", \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"corge\")])]),_vm._v(\" and \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"looping\")])]),_vm._v(\". In the main function, we are calling \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"foo\")])]),_vm._v(\". This function will call \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"baz.Baz\")])]),_vm._v(\" will call \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"corge\")])]),_vm._v(\" and \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"corge\")])]),_vm._v(\" will finally try to open a file (that doesn’t exist).\")]),_c('p',[_vm._v(\"When we execute the program, we get the following output :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"open /my/imagination.go: no such file or directory\")])]),_c('p',[_vm._v(\"Where does the error come from? Does it come from the function \"),_c('strong',[_vm._v(\"corge\")]),_vm._v(\" ? Does it come from the function \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"looping\")])]),_vm._v(\" ? If you want to know, you will have to follow the execution path mentally (to discover finally that \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"looping\")])]),_vm._v(\" is never called, and thus the error comes from \"),_c('strong',[_vm._v(\"corge\")]),_vm._v(\".\")]),_c('p',[_vm._v(\"This exercise is hard in this example; it can become a nightmare for bigger applications of packages with hundreds of files.\")]),_c('p',[_vm._v(\"The solution? Use the standard error package that allow you to wrap errors. (put another error into an error) \"),_c('a',{staticClass:\"footnote-ref\",attrs:{\"href\":\"#fn2\",\"id\":\"fnref2\",\"role\":\"doc-noteref\"}},[_c('sup',[_vm._v(\"2\")])]),_vm._v(\":\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"// recommendation/errors/better/main.go\\npackage main\\n\\nimport (\\n \\\"fmt\\\"\\n \\\"io/ioutil\\\"\\n)\\n\\nfunc main() {\\n err := foo(\\\"test\\\")\\n if err != nil {\\n fmt.Println(err)\\n }\\n}\\n\\nfunc foo(bar string) error {\\n err := baz()\\n if err != nil {\\n return fmt.Errorf(\\\"error while calling baz: %w\\\", err)\\n }\\n return nil\\n}\\n\\nfunc baz() error {\\n return corge()\\n}\\n\\nfunc corge() error {\\n _, err := ioutil.ReadFile(\\\"/my/imagination.go\\\")\\n if err != nil {\\n return fmt.Errorf(\\\"error while reading file: %w\\\", err)\\n }\\n return nil\\n}\\n\\nfunc looping() ([]byte, error) {\\n return ioutil.ReadFile(\\\"/my/imagination.go\\\")\\n}\")])]),_c('p',[_vm._v(\"We simply use \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"fmt.Errorf\")])]),_vm._v(\" with the formatting verb \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"%w\")])]),_vm._v(\" that will wrap the error. With this simple addition, the output of our program is now :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"error while calling baz: error while reading file: open /my/imagination.go: no such file or directory\")])]),_c('p',[_vm._v(\"You can see that the errors are clearer, and the localization of the failure immediate.\")]),_c('ul',[_c('li',[_c('p',[_c('strong',[_vm._v(\"Never ignore errors\")]),_vm._v(\". It’s maybe obvious, but still, many developers are making this mistake. Errors that arise should be handled :\")]),_c('ul',[_c('li',[_c('p',[_vm._v(\"returned to the caller\")])]),_c('li',[_c('p',[_vm._v(\"or treated (your code implement some kind of auto-correction mechanism)\")])])])]),_c('li',[_c('p',[_c('strong',[_vm._v(\"Use fatal errors carefully.\")]),_vm._v(\" When you make a call to log.Fatal[f] you are implicitly forcing your program to exit very abruptly (with an \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"os.Exit(1)\")])]),_vm._v(\").“The program terminates immediately; deferred functions are not run.” (os/proc.go). Deferred functions are often used for cleaning logic (for instance closing file descriptors). As a consequence, not running them is not optimal.\")])])]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"// standard log package.\\n// Fatal is equivalent to Print() followed by a call to os.Exit(1).\\nfunc Fatal(v ...interface{}) {\\n std.Output(2, fmt.Sprint(v...))\\n os.Exit(1)\\n}\")])]),_c('ul',[_c('li',[_c('strong',[_vm._v(\"Try to create fault-tolerant programs\")]),_vm._v(\". The term “fault tolerance” is used a lot by hardware engineers. Most hardware components are designed to handle failures graciously and to recover from them. Software engineers should also build their programs to tolerate errors. A program should serve its purpose despite failures (which can be transient or permanent).\")])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"if-an-error-occurs-examine-it-to-determine-if-its-recoverable-or-not.\"}}),_c('h2',{attrs:{\"data-number\":\"6.1\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"6.1\")]),_vm._v(\" If an error occurs, examine it to determine if it’s recoverable or not. \"),_c('a',{attrs:{\"href\":\"#if-an-error-occurs-examine-it-to-determine-if-its-recoverable-or-not.\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"For instance, you are building a program that makes a call to a webservice. During the execution of your program, the call failed. The source of failure is the network (your server has been disconnected from the internet). This error is recoverable, meaning that you can recover from the error because the network will become available again sometime.\")]),_c('p',[_vm._v(\"If the call to your webservice successfully pass through the network but returned an http 301 error (“Moved Permanently”) the error is not recoverable. You had made a mistake when you defined the URL of the webservice Or your webservice provider has changed something without warning you. Human intervention will be necessary.\")]),_c('ul',[_c('li',[_c('strong',[_vm._v(\"Implement a fallback option.\")])])]),_c('p',[_vm._v(\"A fallback option is “is a contingency option to be taken if the preferred choice is unavailable” (Wikipedia). In our program, for instance, the network call is not possible or has returned an error. We should think about options.\")]),_c('p',[_vm._v(\"Options will not be the same if the error is recoverable or not.\")]),_c('p',[_vm._v(\"If you experienced a network failure, instead of directly returning the error, you could implement a \"),_c('strong',[_vm._v(\"retry\")]),_vm._v(\" mechanism. You will retry to contact the webservice a configurable number of times.\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"methods-and-functions\"}}),_c('BuyCopyInvite'),_c('h1',{attrs:{\"data-number\":\"7\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"7\")]),_vm._v(\" Methods and functions \"),_c('a',{attrs:{\"href\":\"#methods-and-functions\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"Functions and methods are everywhere inside a program. A syntactically correct function (i.e., the program compiles) might not be stylistically good. We want here to introduce some recommendations related to function writing. In a word, how to write functions with style.\")]),_c('table',[_c('caption',[_vm._v(\"Methods and functions recommendations\")]),_c('thead',[_c('tr',{staticClass:\"header\"},[_c('th',{staticStyle:{\"text-align\":\"center\"}},[_vm._v(\"Advice\")])])]),_c('tbody',[_c('tr',{staticClass:\"odd\"},[_c('td',{staticStyle:{\"text-align\":\"center\"}},[_vm._v(\"One function has one goal\")])]),_c('tr',{staticClass:\"even\"},[_c('td',{staticStyle:{\"text-align\":\"center\"}},[_vm._v(\"Simple names\")])]),_c('tr',{staticClass:\"odd\"},[_c('td',{staticStyle:{\"text-align\":\"center\"}},[_vm._v(\"Limited length (100 lines maximum)\")])]),_c('tr',{staticClass:\"even\"},[_c('td',{staticStyle:{\"text-align\":\"center\"}},[_vm._v(\"Reduce cyclomatic complexity\")])]),_c('tr',{staticClass:\"odd\"},[_c('td',{staticStyle:{\"text-align\":\"center\"}},[_vm._v(\"Reduce the number of nesting levels\")])])])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"one-function-has-one-goal.\"}}),_c('h2',{attrs:{\"data-number\":\"7.1\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"7.1\")]),_vm._v(\" One function has one goal. \"),_c('a',{attrs:{\"href\":\"#one-function-has-one-goal.\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"A function is a named procedure (or routine) that will perform a \"),_c('strong',[_vm._v(\"specific\")]),_vm._v(\" task. It can have input parameters and also output parameters. The important term here is “specific”. The function (or method) performs a single task, not multiple. It has a single goal.\")]),_c('p',[_vm._v(\"A great function is a function that does one thing, and that does it perfectly well. In math, for instance, the exponential function will compute the value of exp(x) for every x real value.\")]),_c('p',[_vm._v(\"This function should have only one goal, which is simple to understand. The function will not compute at the same time the exponential and the logarithmic value of x. Instead, we have two functions, the exponential function, and the logarithm function.\")]),_c('p',[_vm._v(\"Here is a counter-example :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"type User struct {\\n //...\\n}\\n\\nfunc (u *User) saveAndAuthorize error {\\n //...\\n return nil\\n}\")])]),_c('p',[_vm._v(\"The method \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"saveAndAuthorize\")])]),_vm._v(\" perform 2 tasks :\")]),_c('ul',[_c('li',[_c('p',[_vm._v(\"save the user\")])]),_c('li',[_c('p',[_c('strong',[_vm._v(\"and\")]),_vm._v(\" authorize it.\")])])]),_c('p',[_vm._v(\"Two different tasks require different abilities (writing to a database, reading from a database, check an access token validity ...). This program will compile, but it will be difficult to test. The error returned can be provoked by the failure of the data layer but also from the security layer of the app.\")]),_c('p',[_vm._v(\"A solution could be to split the function into two different ones : \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"create\")])]),_vm._v(\" and \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"authorize\")])]),_vm._v(\".\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"func (u *User) create error {\\n //..\\n return nil\\n}\\n\\nfunc (user *User) authorize error {\\n //...\\n return nil\\n}\")])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"simple-names\"}}),_c('h2',{attrs:{\"data-number\":\"7.2\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"7.2\")]),_vm._v(\" Simple Names \"),_c('a',{attrs:{\"href\":\"#simple-names\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('ul',[_c('li',[_vm._v(\"Do not repeat the name of the receiver type in the method name\")])]),_c('p',[_vm._v(\"For instance :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"func (u *User) saveUser() error {\\n\\n return nil\\n}\\n\\nfunc (u *User) authorizeUser() error {\\n\\n return nil\\n}\")])]),_c('p',[_vm._v(\"We can rename those two functions:\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"func (u *User) save() error {\\n\\n return nil\\n}\\n\\nfunc (u *User) authorize() error {\\n\\n return nil\\n}\")])]),_c('p',[_vm._v(\"We reduce the function name’s size by removing the type name user. Remember to always \"),_c('strong',[_vm._v(\"think in the perspective of the caller\")]),_vm._v(\" of your package. Let’s compare those two snippets :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"user := user.NewUser()\\nerr := user.saveUser()\\nif err != nil {\\n //..\\n}\\n\\nuser := user.New()\\nerr := user.save()\\nif err != nil {\\n //..\\n}\")])]),_c('p',[_vm._v(\"The second one is is much simpler than the first one. The first one is composed of 65 characters, whereas the second one is composed of 57 characters (space included).\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"a-limited-number-of-lines\"}}),_c('h2',{attrs:{\"data-number\":\"7.3\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"7.3\")]),_vm._v(\" A limited number of lines \"),_c('a',{attrs:{\"href\":\"#a-limited-number-of-lines\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"A function should pursue one goal (see the previous section), and it should be small. When you increase the number of lines in a function, you also increase the time and cognitive effort to read it and then understand it.\")]),_c('p',[_vm._v(\"For instance, here is the function \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"Pop\")])]),_vm._v(\" from the package \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"heap\")])]),_vm._v(\" :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"func Pop(h Interface) interface{} {\\n n := h.Len() - 1\\n h.Swap(0, n)\\n down(h, 0, n)\\n return h.Pop()\\n}\")])]),_c('p',[_vm._v(\"The number of lines of this function is just 4. It makes it pretty easy and to understand. Compare this function from the \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"ascii85\")])]),_vm._v(\" package :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"func (d *decoder) Read(p []byte) (n int, err error) {\\n if len(p) == 0 {\\n return 0, nil\\n }\\n if d.err != nil {\\n return 0, d.err\\n }\\n\\n for {\\n // Copy leftover output from last decode.\\n if len(d.out) > 0 {\\n n = copy(p, d.out)\\n d.out = d.out[n:]\\n return\\n }\\n\\n // Decode leftover input from last read.\\n var nn, nsrc, ndst int\\n if d.nbuf > 0 {\\n ndst, nsrc, d.err = Decode(d.outbuf[0:], d.buf[0:d.nbuf], d.readErr != nil)\\n if ndst > 0 {\\n d.out = d.outbuf[0:ndst]\\n d.nbuf = copy(d.buf[0:], d.buf[nsrc:d.nbuf])\\n continue // copy out and return\\n }\\n if ndst == 0 && d.err == nil {\\n // Special case: input buffer is mostly filled with non-data bytes.\\n // Filter out such bytes to make room for more input.\\n off := 0\\n for i := 0; i < d.nbuf; i++ {\\n if d.buf[i] > ' ' {\\n d.buf[off] = d.buf[i]\\n off++\\n }\\n }\\n d.nbuf = off\\n }\\n }\\n\\n // Out of input, out of decoded output. Check errors.\\n if d.err != nil {\\n return 0, d.err\\n }\\n if d.readErr != nil {\\n d.err = d.readErr\\n return 0, d.err\\n }\\n\\n // Read more data.\\n nn, d.readErr = d.r.Read(d.buf[d.nbuf:])\\n d.nbuf += nn\\n }\\n}\")])]),_c('p',[_vm._v(\"This function has 50 lines.\")]),_c('p',[_vm._v(\"What is the good number of lines. In my opinion, a good function should not have more than 30 lines. You should be able to display a function in your IDE (code editor) window without the need to scroll down. On my IDE, I can read just 38 lines at once.\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"reduced-cyclomatic-complexity\"}}),_c('h2',{attrs:{\"data-number\":\"7.4\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"7.4\")]),_vm._v(\" Reduced cyclomatic complexity \"),_c('a',{attrs:{\"href\":\"#reduced-cyclomatic-complexity\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"The number of lines inside a function is not sufficient to judge its simplicity. In 1976 Thomal J.McCabe developed an interesting notion called “cyclomatic complexity”\"),_c('b-link',{staticClass:\"citation\",attrs:{\"data-cites\":\"mccabe1976complexity\",\"href\":\"#mccabe1976complexity\"}},[_vm._v(\"[@mccabe1976complexity]\")]),_vm._v(\". The idea is that we can use the graph theory to detect complexity in programs.\")],1),_c('p',[_vm._v(\"We can compose a function of one or more conditional statements. For instance, we can have several if statements. Let’s take a look at the following example.\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"package main\\n\\nimport \\\"fmt\\\"\\n\\nfunc main() {\\n fmt.Println(foo(2, 3))\\n fmt.Println(foo(11, 0))\\n fmt.Println(foo(8, 12))\\n}\\n\\nfunc foo(a, b int) int {\\n if a > 10 {\\n return a\\n }\\n if b > 10 {\\n return b\\n }\\n return b - a\\n}\")])]),_c('p',[_vm._v(\"In the function foo we have two input parameters, \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"a\")])]),_vm._v(\" and \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"b\")])]),_vm._v(\". In the function body, we can observe two if statements. We have two conditions (we compare \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"a\")])]),_vm._v(\" and \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"b\")])]),_vm._v(\" to specific numbers).\")]),_c('p',[_vm._v(\"When we run our function, we can imagine three logical “paths” :\")]),_c('ul',[_c('li',[_c('p',[_vm._v(\"The first condition is true. The second condition is not evaluated. The returned value is \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"a\")])]),_vm._v(\".\")])]),_c('li',[_c('p',[_vm._v(\"The first condition is false, the second is true. The returned value is \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"b\")])]),_vm._v(\".\")])]),_c('li',[_c('p',[_vm._v(\"The first condition is false, and the second is also false. The return value is \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"b-a\")])])])])]),_c('p',[_vm._v(\"We have three paths. The more paths you have, the more effort you need to understand the function.\")]),_c('p',[_vm._v(\"The more paths you got, the more unit tests you have to develop to cover all the possible cases.\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"computation-of-the-cyclomatic-number\"}}),_c('h4',{attrs:{\"data-number\":\"7.4.0.1\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"7.4.0.1\")]),_vm._v(\" Computation of the cyclomatic number \"),_c('a',{attrs:{\"href\":\"#computation-of-the-cyclomatic-number\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"This section is not mandatory to understand the concept of cyclomatic complexity reduction. But, you might find it interesting to know the reasoning behind “cyclomatic complexity”.\")]),_c('p',[_vm._v(\"First, every program can be seen as a graph. A graph is composed of nodes and edges. For instance on the figure \"),_c('a',{attrs:{\"href\":\"#fig:Edges-and-nodes\",\"data-reference-type\":\"ref\",\"data-reference\":\"fig:Edges-and-nodes\"}},[_vm._v(\"3\")]),_vm._v(\" you can see a graph. A graph is composed of nodes and edges. Each node will represent a group of code. The edges will represent the flow of control in the program.\")]),_c('figure',[_c('b-img',{staticClass:\"img-book\",attrs:{\"src\":require('@/assets/images/edge_nodes.png'),\"alt\":\"Edges and nodes in a directed graph[fig:Edges-and-nodes]\",\"fluid\":\"\",\"thumbnail\":\"\"}}),_c('figcaption',{attrs:{\"aria-hidden\":\"true\"}},[_vm._v(\"Edges and nodes in a directed graph\"),_c('span',{attrs:{\"id\":\"fig:Edges-and-nodes\",\"label\":\"fig:Edges-and-nodes\"}},[_vm._v(\"[fig:Edges-and-nodes]\")])])],1),_c('p',[_vm._v(\"Let’s take a simple example. We have the following function :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"func bar(a int) {\\n fmt.Println(\\\"start of function\\\")\\n if a > 2 {\\n fmt.Println(\\\"a is greater than 2\\\")\\n return\\n }\\n fmt.Println(\\\"you got\\\")\\n fmt.Println(\\\"bad luck\\\")\\n}\")])]),_c('figure',[_c('b-img',{staticClass:\"img-book\",attrs:{\"src\":require('@/assets/images/cyclo_complexity.png'),\"alt\":\"Graph and correcponding function\",\"fluid\":\"\",\"thumbnail\":\"\"}}),_c('figcaption',{attrs:{\"aria-hidden\":\"true\"}},[_vm._v(\"Graph and correcponding function\")])],1),_c('p',[_vm._v(\"We have represented here the program with a set of nodes and edges. Each block of code is represented by a node. This is very important here. We do not add a node for every statement but for every group of executed statements following a decision rule. Here we have to call to \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"fmt.Println\")])]),_vm._v(\" that are represented by a single node.\")]),_c('p',[_vm._v(\"Let’s count the nodes and the edges on that graph :\")]),_c('ul',[_c('li',[_c('p',[_vm._v(\"Four nodes\")])]),_c('li',[_c('p',[_vm._v(\"Three edges\")])])]),_c('p',[_vm._v(\"The formula to get the cyclomatic complexity is (for a function) :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"V(G)= # of edges- # of nodes + 2\")])]),_c('p',[_vm._v(\"The cyclomatic number is denoted \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"V(G)\")])]),_vm._v(\".\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"V(G)= 3 - 3 + 2 = 2\")])]),_c('p',[_vm._v(\"Here the cyclomatic number is equal to 2 it means that our program defines two linearly independent paths. When this number grows, your function grows in complexity :\")]),_c('ul',[_c('li',[_c('p',[_vm._v(\"More paths mean more unit tests to develop to cover your code fully\")])]),_c('li',[_c('p',[_vm._v(\"More paths mean more brainpower needed for your colleagues to understand your code.\")])])]),_c('p',[_c('strong',[_vm._v(\"Some important facts about the cyclomatic number (\"),_c('b-link',{staticClass:\"citation\",attrs:{\"data-cites\":\"mccabe1976complexity\",\"href\":\"#mccabe1976complexity\"}},[_vm._v(\"[@mccabe1976complexity]\")]),_vm._v(\") :\")],1)]),_c('ul',[_c('li',[_c('p',[_vm._v(\"This number depends only on the “decision structure of the graph”.\")])]),_c('li',[_c('p',[_vm._v(\"It is not affected when you add a functional statement to your code.\")])]),_c('li',[_c('p',[_vm._v(\"If you insert a new edge in the graph, then you will increase the cyclomatic number by 1\")])])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"halstead-metrics\"}}),_c('h2',{attrs:{\"data-number\":\"7.5\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"7.5\")]),_vm._v(\" Halstead metrics \"),_c('a',{attrs:{\"href\":\"#halstead-metrics\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"I want to devote this section to the so-called “Halstead Complexity metrics”. Maurice Howard Halstead was one of the pioneers of computer science. He has developed in 1977 metrics to assess a program’s complexity with metrics derived from its source code.\")]),_c('ul',[_c('li',[_c('p',[_vm._v(\"The program \"),_c('strong',[_vm._v(\"vocabulary\")])])]),_c('li',[_c('p',[_vm._v(\"The program \"),_c('strong',[_vm._v(\"length\")])])]),_c('li',[_c('p',[_vm._v(\"The \"),_c('strong',[_vm._v(\"effort\")]),_vm._v(\" required to write the program\")])]),_c('li',[_c('p',[_vm._v(\"The \"),_c('strong',[_vm._v(\"difficulty\")]),_vm._v(\" that will be needed to read and understand the program\")])])]),_c('p',[_vm._v(\"Halstead metrics are based on two concepts. Operators and operands. A program is composed of tokens. Those tokens are reserved words, variables names, brackets, curly brackets... etc. Those tokens can be classed into two main categories :\")]),_c('ol',{attrs:{\"type\":\"1\"}},[_c('li',[_c('p',[_c('strong',[_vm._v(\"Operators :\")])]),_c('ol',{attrs:{\"type\":\"1\"}},[_c('li',[_c('p',[_vm._v(\"All reserved words. (func, const, var,...)\")])]),_c('li',[_c('p',[_vm._v(\"Pairs of brackets, pairs of curly brackets ({},())\")])]),_c('li',[_c('p',[_vm._v(\"All the comparison and logical operators ( >,<,&&,||,...)\")])])])]),_c('li',[_c('p',[_c('strong',[_vm._v(\"Operands :\")])]),_c('ol',{attrs:{\"type\":\"1\"}},[_c('li',[_c('p',[_vm._v(\"Identifiers (a, myVariableName, myConstantName, myFunction,...)\")])]),_c('li',[_c('p',[_vm._v(\"Constant values (“this is a string”, 3, 22,...)\")])]),_c('li',[_c('p',[_vm._v(\"Type specification (int, bool,...)\")])])])])]),_c('p',[_vm._v(\"From those two definitions, we can extract some base numbers (we will use that to compute Halstead metrics) :\")]),_c('ul',[_c('li',[_c('p',[_c('span',{staticClass:\"math inline\"},[_vm._v(\"n_{1}\")]),_vm._v(\" the number of distinct operators\")])]),_c('li',[_c('p',[_c('span',{staticClass:\"math inline\"},[_vm._v(\"n_{2}\")]),_vm._v(\" the number of distinct operands\")])]),_c('li',[_c('p',[_c('span',{staticClass:\"math inline\"},[_vm._v(\"N_{1}\")]),_vm._v(\" the total number of operators\")])]),_c('li',[_c('p',[_c('span',{staticClass:\"math inline\"},[_vm._v(\"N_{2}\")]),_vm._v(\" the total number of operands\")])])]),_c('p',[_vm._v(\"Let’s take an example program to extract those four numbers :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"func bar(a int) {\\n fmt.Println(\\\"start of function\\\")\\n if a > 2 {\\n fmt.Println(\\\"a is greater than 2\\\")\\n return\\n }\\n fmt.Println(\\\"you got\\\")\\n fmt.Println(\\\"bad luck\\\")\\n}\")])]),_c('p',[_c('span',{staticClass:\"math inline\"},[_vm._v(\"n_{1}\")]),_vm._v(\" is the number of distinct operators\")]),_c('ul',[_c('li',[_c('p',[_vm._v(\"func, bar, (), {}, if, >, return\")]),_c('ul',[_c('li',[_vm._v(\"We have seven distinct operators here\")])])])]),_c('p',[_c('span',{staticClass:\"math inline\"},[_vm._v(\"n_{2}\")]),_vm._v(\" is the number of distinct operands\")]),_c('ul',[_c('li',[_c('p',[_vm._v(\"int, a, fmt.Println,start of function, 2, a is greater than 2,you got,bad luck\")]),_c('ul',[_c('li',[_vm._v(\"We have nine distinct operands\")])])])]),_c('p',[_c('span',{staticClass:\"math inline\"},[_vm._v(\"N_{1}\")]),_vm._v(\" is the total number of operators\")]),_c('ul',[_c('li',[_c('p',[_vm._v(\"func, bar, (), () ,() ,() ,() ,{},{}, if, >, return\")]),_c('ul',[_c('li',[_vm._v(\"We have 12\")])])])]),_c('p',[_c('span',{staticClass:\"math inline\"},[_vm._v(\"N_{2}\")]),_vm._v(\" is the total number of operands\")]),_c('ul',[_c('li',[_c('p',[_vm._v(\"a, a,start of function, 2, a is greater than 2,you got,bad luck, fmt.Println, fmt.Println,fmt.Println, fmt.Println, int\")]),_c('ul',[_c('li',[_vm._v(\"We have a total of 12 operands\")])])])]),_c('p',[_vm._v(\"Let’s compute the Halstead metrics for our program :\")]),_c('dl',[_c('dt',[_vm._v(\"vocabulary\")]),_c('dd',[_c('p',[_c('span',{staticClass:\"math inline\"},[_vm._v(\"n=n_{1}+n_{2}=8+9=17\")])])]),_c('dt',[_vm._v(\"length\")]),_c('dd',[_c('p',[_c('span',{staticClass:\"math inline\"},[_vm._v(\"N=N_{1}+N_{2}=12+12=24\")])])]),_c('dt',[_vm._v(\"difficulty\")]),_c('dd',[_c('p',[_c('span',{staticClass:\"math inline\"},[_vm._v(\"\\\\frac{n_{1}}{2}\\\\times\\\\frac{N_{2}}{n_{2}}=5.33\")])])]),_c('dt',[_vm._v(\"volume\")]),_c('dd',[_c('p',[_c('span',{staticClass:\"math inline\"},[_vm._v(\"\\\\text{length}\\\\times log_{2}(\\\\text{vocabulary})=98.10\")])])]),_c('dt',[_vm._v(\"effort\")]),_c('dd',[_c('p',[_c('span',{staticClass:\"math inline\"},[_vm._v(\"\\\\text{difficulty}\\\\times\\\\text{volume = 523.20}\")])])])]),_c('p',[_vm._v(\"Those formulas are worth some explanations.\")]),_c('ul',[_c('li',[_c('p',[_vm._v(\"The \"),_c('strong',[_vm._v(\"vocabulary\")]),_vm._v(\" of a program is just like the vocabulary of some essay. For an English essay, we can say that an author’s vocabulary is the total number of different words. For a program, this is the addition of the total number of distinct operators and operands. If the program use only reserved words and a very limited number of identifiers, its vocabulary will below. On the contrary, if your program uses many identifiers, the vocabulary will increase.\")])]),_c('li',[_c('p',[_vm._v(\"The \"),_c('strong',[_vm._v(\"length\")]),_vm._v(\" of a program is the total number of operators and operands used. Here we are not counting distinct tokens but the total number of tokens.\")])]),_c('li',[_c('p',[_vm._v(\"The \"),_c('strong',[_vm._v(\"difficulty\")]),_vm._v(\" is here to give an idea about the amount of time needed to write the program, and to read it. This metrics is equal to half the number of operands multiplied by the quotient between the total number of operators and the distinct number of operands. If your program uses a limited number of operands, the difficulty will be reduced. If the total number of operands increases, the difficulty will also increase (more comparisons, more identifiers, more types to handle and remember).\")])]),_c('li',[_c('p',[_vm._v(\"The effort metric can then be used to compute the time necessary to write the program.\")])])]),_c('p',[_vm._v(\"Time to write the program : E/18 (in seconds) : in our example : 29 seconds (523,20 / 18).\")]),_c('p',[_vm._v(\"Halstead also details an estimated number of bugs! \"),_c('span',{staticClass:\"math display\"},[_vm._v(\"B=\\\\frac{E^{2/3}}{3000}\")])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"comment\"}}),_c('h4',{attrs:{\"data-number\":\"7.5.0.1\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"7.5.0.1\")]),_vm._v(\" Comment \"),_c('a',{attrs:{\"href\":\"#comment\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('ul',[_c('li',[_c('p',[_vm._v(\"Those metrics are interesting, but we should take them cautiously.\")])]),_c('li',[_c('p',[_vm._v(\"However, they highlight that the more code we write, the more complex our program will become.\")])]),_c('li',[_c('p',[_vm._v(\"A simple, short, and stupid code is better than an over-engineered solution.\")])])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"reduce-the-number-of-nesting-levels\"}}),_c('h2',{attrs:{\"data-number\":\"7.6\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"7.6\")]),_vm._v(\" Reduce the number of nesting levels \"),_c('a',{attrs:{\"href\":\"#reduce-the-number-of-nesting-levels\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"This advice has to be linked with the previous section. When you write a program, you can introduce nested statements, i.e., statements executed in a specific branch. Let’s take an example. Here, we have a dummy function with a first condition that creates two branches. In the first branch, visualize we have introduced another conditional statement (if b < 2 ) that will also create two branches.\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"// recommendation/nesting/main.go \\n//...\\n\\nfunc nested(a, b int) {\\n if a > 1 {\\n if b < 2 { // nested condition\\n fmt.Println(\\\"action 1\\\")\\n } else {\\n fmt.Println(\\\"action 2\\\")\\n }\\n } else {\\n fmt.Println(\\\"action 3\\\")\\n }\\n fmt.Println(\\\"action 4\\\")\\n}\")])]),_c('p',[_vm._v(\"You can vizualize the in the sequence diagram (figure \"),_c('a',{attrs:{\"href\":\"#fig:Nested-Statement-sequence\",\"data-reference-type\":\"ref\",\"data-reference\":\"fig:Nested-Statement-sequence\"}},[_vm._v(\"4\")]),_vm._v(\") the branches.\")]),_c('figure',[_c('b-img',{staticClass:\"img-book\",attrs:{\"src\":require('@/assets/images/nested_stetements.png'),\"alt\":\"Nested Statement sequence diagram[fig:Nested-Statement-sequence]\",\"fluid\":\"\",\"thumbnail\":\"\"}}),_c('figcaption',{attrs:{\"aria-hidden\":\"true\"}},[_vm._v(\"Nested Statement sequence diagram\"),_c('span',{attrs:{\"id\":\"fig:Nested-Statement-sequence\",\"label\":\"fig:Nested-Statement-sequence\"}},[_vm._v(\"[fig:Nested-Statement-sequence]\")])])],1),_c('p',[_vm._v(\"We can add another level of nesting :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"// recommendation/nesting/main.go \\n//...\\n\\nfunc nested2(a, b int) {\\n if a > 1 {\\n if b < 2 { // nested condition\\n if a > 100 {\\n fmt.Println(\\\"action 1\\\")\\n } else {\\n fmt.Println(\\\"action 2\\\")\\n }\\n } else {\\n fmt.Println(\\\"action 3\\\")\\n }\\n } else {\\n fmt.Println(\\\"action 4\\\")\\n }\\n fmt.Println(\\\"action 5\\\")\\n}\")])]),_c('p',[_vm._v(\"On the figure \"),_c('a',{attrs:{\"href\":\"#fig:Nested-Statements-2\",\"data-reference-type\":\"ref\",\"data-reference\":\"fig:Nested-Statements-2\"}},[_vm._v(\"5\")]),_vm._v(\" you can see the impact on the sequence diagram of this new nesting level.\")]),_c('figure',[_c('b-img',{staticClass:\"img-book\",attrs:{\"src\":require('@/assets/images/nested_statement_2.png'),\"alt\":\"Nested Statements (version 2) sequence diagram[fig:Nested-Statements-2]\",\"fluid\":\"\",\"thumbnail\":\"\"}}),_c('figcaption',{attrs:{\"aria-hidden\":\"true\"}},[_vm._v(\"Nested Statements (version 2) sequence diagram\"),_c('span',{attrs:{\"id\":\"fig:Nested-Statements-2\",\"label\":\"fig:Nested-Statements-2\"}},[_vm._v(\"[fig:Nested-Statements-2]\")])])],1),_c('p',[_vm._v(\"The more nesting levels you got, the more complicated your code will become. One general piece of advice would be to limit nesting levels. If you find yourself in a situation where you cannot avoid it, you should instead create another function to support that complexity :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"// recommendation/nesting/main.go \\n//...\\n\\nfunc nested3(a, b int) {\\n if a > 1 {\\n subFct1(a, b)\\n } else {\\n fmt.Println(\\\"action 4\\\")\\n }\\n fmt.Println(\\\"action 5\\\")\\n}\\n\\nfunc subFct1(a, b int) {\\n if b < 2 { // nested condition\\n if a > 100 {\\n fmt.Println(\\\"action 1\\\")\\n } else {\\n fmt.Println(\\\"action 2\\\")\\n }\\n } else {\\n fmt.Println(\\\"action 3\\\")\\n }\\n}\")])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"key-takeaways\"}}),_c('h1',{attrs:{\"data-number\":\"8\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"8\")]),_vm._v(\" Key takeaways \"),_c('a',{attrs:{\"href\":\"#key-takeaways\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('ul',[_c('li',[_c('p',[_vm._v(\"Package names\")]),_c('ul',[_c('li',[_c('p',[_vm._v(\"Short: no more than one word\")])]),_c('li',[_c('p',[_vm._v(\"No plural\")])]),_c('li',[_c('p',[_vm._v(\"Lower case\")])]),_c('li',[_c('p',[_vm._v(\"Informative about the service it gives\")])]),_c('li',[_c('p',[_vm._v(\"Avoid utilities/models packages\")])])])]),_c('li',[_c('p',[_vm._v(\"Interfaces\")]),_c('ul',[_c('li',[_c('p',[_vm._v(\"Use interfaces as function/method arguments & as field types\")])]),_c('li',[_c('p',[_vm._v(\"Small interfaces are better\")])])])]),_c('li',[_c('p',[_vm._v(\"Source files\")]),_c('ul',[_c('li',[_c('p',[_vm._v(\"One file should be named like the package\")])]),_c('li',[_c('p',[_vm._v(\"No more than 600 lines per file\")])]),_c('li',[_c('p',[_vm._v(\"One file = One responsibility\")])])])]),_c('li',[_c('p',[_vm._v(\"Error Handling\")]),_c('ul',[_c('li',[_c('p',[_vm._v(\"Always add context to errors\")])]),_c('li',[_c('p',[_vm._v(\"Never ignore errors\")])]),_c('li',[_c('p',[_vm._v(\"Use fatal errors carefully\")])]),_c('li',[_c('p',[_vm._v(\"Create fault-tolerant programs\")])])])]),_c('li',[_c('p',[_vm._v(\"Methods/functions\")]),_c('ul',[_c('li',[_c('p',[_vm._v(\"One function has one goal\")])]),_c('li',[_c('p',[_vm._v(\"Simple names\")])]),_c('li',[_c('p',[_vm._v(\"Limited length (100 lines maximum)\")])]),_c('li',[_c('p',[_vm._v(\"Reduce cyclomatic complexity\")])]),_c('li',[_c('p',[_vm._v(\"Reduce the number of nesting levels\")])])])])]),_c('section',{staticClass:\"footnotes\",attrs:{\"role\":\"doc-endnotes\"}},[_c('hr'),_c('ol',[_c('li',{attrs:{\"id\":\"fn1\",\"role\":\"doc-endnote\"}},[_c('p',[_vm._v(\"Totally arbitrary number\"),_c('a',{staticClass:\"footnote-back\",attrs:{\"href\":\"#fnref1\",\"role\":\"doc-backlink\"}},[_vm._v(\"↩︎\")])])]),_c('li',{attrs:{\"id\":\"fn2\",\"role\":\"doc-endnote\"}},[_c('p',[_vm._v(\"Note that this package was originally developed by Dave Cheney https://github.com/pkg/errors , it’s now part of the standard library\"),_c('a',{staticClass:\"footnote-back\",attrs:{\"href\":\"#fnref2\",\"role\":\"doc-backlink\"}},[_vm._v(\"↩︎\")])])])])]),_c('h1',[_vm._v(\"Bibliography\")]),_c('ChapterBibliography',{attrs:{\"chapter-id\":\"Chap41DesignRecommendations\"}}),_c('b-row',{staticClass:\"ml-1 mr-1 \"},[_c('b-col',{staticClass:\"text-center border mr-1 p-2\"},[_c('router-link',{attrs:{\"to\":{name:'Chap40UpgradingOrDowngradingGo'}}},[_c('p',[_c('u',[_c('small',[_vm._v(\"Previous\")])])]),_c('p',[_c('small',[_vm._v(\"Upgrading or Downgrading Go\")])])])],1),_c('b-col',{staticClass:\"text-center border p-1 \"},[_c('router-link',{attrs:{\"to\":{name:'Chap42Cheatsheet'}}},[_c('p',[_c('u',[_c('small',[_vm._v(\"Next\")])])]),_c('p',[_c('small',[_vm._v(\"Cheatsheet\")])])])],1)],1),_c('b-row',{staticClass:\"mt-1 ml-1 mr-1\"},[_c('b-col',{staticClass:\"text-center border p-1 \"},[_c('b-link',{attrs:{\"to\":{name:'Home'}}},[_vm._v(\"Table of contents\")])],1)],1),_c('FeedbackInvite'),_c('NewsletterInput'),_c('Footer')],1),_c('b-col')],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Chap41DesignRecommendations.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Chap41DesignRecommendations.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Chap41DesignRecommendations.vue?vue&type=template&id=271ec07c&scoped=true&\"\nimport script from \"./Chap41DesignRecommendations.vue?vue&type=script&lang=js&\"\nexport * from \"./Chap41DesignRecommendations.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"271ec07c\",\n null\n \n)\n\nexport default component.exports","module.exports = __webpack_public_path__ + \"img/interface_implementation.41c91f23.png\";","module.exports = __webpack_public_path__ + \"img/nested_stetements.f4da2548.png\";","module.exports = __webpack_public_path__ + \"img/advice_sources.5e438d63.png\";"],"sourceRoot":""}