{"version":3,"sources":["webpack:///./src/assets/images/slice_delete_one_element.png","webpack:///./src/assets/images/slice_growing.png","webpack:///./src/assets/images/slice_inernal_example.png","webpack:///./src/assets/images/slice_internal_rep.png","webpack:///./src/views/Chap21Slices.vue?6193","webpack:///src/views/Chap21Slices.vue","webpack:///./src/views/Chap21Slices.vue?624f","webpack:///./src/views/Chap21Slices.vue","webpack:///./src/assets/images/slice_internal_when_slicing.png","webpack:///./src/assets/images/slice_put_one_elem_to_slice.png","webpack:///./src/assets/images/slice_indexing.png","webpack:///./src/assets/images/append.png","webpack:///./src/assets/images/slices_copy.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,6C,uBCA3CD,EAAOC,QAAU,IAA0B,kC,uBCA3CD,EAAOC,QAAU,IAA0B,0C,uBCA3CD,EAAOC,QAAU,IAA0B,uC,2CCA3C,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,kBAAkBH,EAAG,SAASA,EAAG,QAAQ,CAACG,MAAM,CAAC,KAAO,OAAO,GAAK,MAAM,CAACH,EAAG,iBAAiB,CAACG,MAAM,CAAC,gBAAgB,qBAAqB,aAAa,YAAY,YAAY,YAAYH,EAAG,MAAM,CAACE,YAAY,SAASC,MAAM,CAAC,GAAK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aA,GAAGA,UAAUA,SAASA,WAChDC,cAAcA,EACdC,OAAQA,EACRC,OAAOA,MAMfC,QApBF,WAqBIL,OAAOA,SAASA,EAApBA,IACEM,KAtBF,WAsBA,OAAAC,iBACEC,SAAUA,CACRC,MAAJA,EACIC,UAAJA,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,yBC/1BsV,I,YCOlVC,EAAY,eACd,EACAlD,EACAe,GACA,EACA,KACA,WACA,MAIa,aAAAmC,E,gCClBfpD,EAAOC,QAAU,IAA0B,gD,uBCA3CD,EAAOC,QAAU,IAA0B,gD,qBCA3CD,EAAOC,QAAU,IAA0B,mC,qBCA3CD,EAAOC,QAAU,IAA0B,2B,qBCA3CD,EAAOC,QAAU,IAA0B","file":"js/chunk-37063f12.eab09560.js","sourcesContent":["module.exports = __webpack_public_path__ + \"img/slice_delete_one_element.c56c3354.png\";","module.exports = __webpack_public_path__ + \"img/slice_growing.53418fa9.png\";","module.exports = __webpack_public_path__ + \"img/slice_inernal_example.6aa32199.png\";","module.exports = __webpack_public_path__ + \"img/slice_internal_rep.2d12e3a0.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\":\"Chap21Slices\"}}),_c('b-col'),_c('b-col',{attrs:{\"role\":\"main\",\"md\":\"6\"}},[_c('ChapterHeading',{attrs:{\"chapter-title\":\"Chapter 21: Slices\",\"image-name\":\"slice.jpg\",\"image-alt\":\"Slices\"}}),_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',[_c('p',[_vm._v(\"What is a slice?\")])]),_c('li',[_c('p',[_vm._v(\"How to create a slice.\")])]),_c('li',[_c('p',[_vm._v(\"How to iterate over a slice\")])]),_c('li',[_c('p',[_vm._v(\"How to create multi-dimensional slices.\")])]),_c('li',[_c('p',[_vm._v(\"How to put an element at a specific index in a slice.\")])]),_c('li',[_c('p',[_vm._v(\"How to use append and copy.\")])])]),_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(\"Slice\")])]),_c('li',[_c('p',[_vm._v(\"Length\")])]),_c('li',[_c('p',[_vm._v(\"Capacity\")])]),_c('li',[_c('p',[_vm._v(\"Array\")])]),_c('li',[_c('p',[_vm._v(\"Copy\")])]),_c('li',[_c('p',[_vm._v(\"Pointer to\")])]),_c('li',[_c('p',[_vm._v(\"Variadic function\")])])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"definition\"}}),_c('h1',{attrs:{\"data-number\":\"3\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"3\")]),_vm._v(\" Definition \"),_c('a',{attrs:{\"href\":\"#definition\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"A slice is a \"),_c('strong',[_vm._v(\"growable collection\")]),_vm._v(\" of elements of the \"),_c('strong',[_vm._v(\"same type\")]),_vm._v(\". It’s growable because you do not fix at compile time the size of your slice; you can add elements during the execution. When you add elements to the slice during the program execution, we say that the slice will grow.\")]),_c('p',[_vm._v(\"The type of a slice is denoted by \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"[]T\")])]),_vm._v(\" where T is the name of the type of elements inside the slice.\")]),_c('p',[_vm._v(\"For instance: \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"[]int\")])]),_vm._v(\" is a slice of integers.\")]),_c('p',[_vm._v(\"Note that we do not specify the size of a slice as we do for arrays (see chapter \"),_c('a',{attrs:{\"href\":\"#chap:Arrays\",\"data-reference-type\":\"ref\",\"data-reference\":\"chap:Arrays\"}},[_vm._v(\"[chap:Arrays]\")]),_vm._v(\"). Inside the square brackets, we don’t specify any length. The zero value of a slice is nil.\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"creation-of-a-new-slice\"}}),_c('BuyCopyInvite'),_c('h1',{attrs:{\"data-number\":\"4\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"4\")]),_vm._v(\" Creation of a new slice \"),_c('a',{attrs:{\"href\":\"#creation-of-a-new-slice\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"// slices/creation/main.go\\npackage main\\n\\nfunc main() {\\n s := make([]int, 3)\\n s[0] = 12\\n s[2] = 3\\n}\")])]),_c('p',[_vm._v(\"Here we define the variable \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"s\")])]),_vm._v(\" that is of type \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"[]int\")])]),_vm._v(\" which is a slice of integers. Then we can fill the slice. We define the elements at indexes 0 and 2.\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"s2 = []int{10,12}\")])]),_c('p',[_vm._v(\"We define \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"s2\")])]),_vm._v(\"which is also a slice of integers, and we set its first two elements.\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"slicing-an-array-a-pointer-to-an-array-or-a-slice\"}}),_c('h1',{attrs:{\"data-number\":\"5\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"5\")]),_vm._v(\" Slicing an array, a pointer to an array, or a slice \"),_c('a',{attrs:{\"href\":\"#slicing-an-array-a-pointer-to-an-array-or-a-slice\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"A slice is a piece of something. For instance, a slice of cheese is not the complete cheese but only a part of it. In Go, it’s the same you can slice :\")]),_c('ul',[_c('li',[_c('p',[_vm._v(\"an array\")])]),_c('li',[_c('p',[_vm._v(\"a pointer to an array\")])]),_c('li',[_c('p',[_vm._v(\"a slice\")])])]),_c('p',[_vm._v(\"The result of this operation (called slicing) is a slice. To slice an element, four you can use the following syntax :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"s := e[low:high]\")])]),_c('p',[_vm._v(\"low and high will allow you to select the range of elements in \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"e\")])]),_vm._v(\".\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"example-1\"}}),_c('h3',{attrs:{\"data-number\":\"5.0.1\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"5.0.1\")]),_vm._v(\" Example 1 \"),_c('a',{attrs:{\"href\":\"#example-1\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"// slices/slicing-array/main.go\\npackage main\\n\\nimport \\\"fmt\\\"\\n\\nfunc main() {\\n customers := [4]string{\\\"John Doe\\\", \\\"Helmuth Verein\\\", \\\"Dany Beril\\\", \\\"Oliver Lump\\\"}\\n // slice the array\\n customersSlice := customers[0:1]\\n fmt.Println(customersSlice)\\n}\")])]),_c('p',[_vm._v(\"This program will output :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"[John Doe]\")])]),_c('p',[_vm._v(\"We have an array of strings named \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"customers\")])]),_vm._v(\". This slice contains 4 elements.\")]),_c('p',[_vm._v(\"We create a slice from this array. \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"customers[0:1]\")])]),_vm._v(\" will create a slice containing the element of the array from index 0 to index 1-1=0. In other words, we take the first element.\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"example-2\"}}),_c('h3',{attrs:{\"data-number\":\"5.0.2\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"5.0.2\")]),_vm._v(\" Example 2 \"),_c('a',{attrs:{\"href\":\"#example-2\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"customersSlice2 := customers[2:4]\\nfmt.Println(customersSlice2)\")])]),_c('p',[_vm._v(\"This program will output :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"[Dany Beril Oliver Lump]\")])]),_c('p',[_vm._v(\"We take the elements from indice \"),_c('span',{staticClass:\"math inline\"},[_vm._v(\"2\")]),_vm._v(\" to index 4-1=3\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"remember\"}}),_c('h3',{attrs:{\"data-number\":\"5.0.3\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"5.0.3\")]),_vm._v(\" Remember \"),_c('a',{attrs:{\"href\":\"#remember\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"When you write :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"s := e[low:high]\")])]),_c('p',[_vm._v(\"You have to subtract one from \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"high\")])]),_vm._v(\" to get the highest element index in e.\")]),_c('p',[_vm._v(\"Another way to remember it is that we take the elements from low to high \"),_c('strong',[_vm._v(\"excluded\")]),_vm._v(\".\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"do-slicing-copy-data\"}}),_c('h1',{attrs:{\"data-number\":\"6\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"6\")]),_vm._v(\" Do slicing copy data? \"),_c('a',{attrs:{\"href\":\"#do-slicing-copy-data\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"No! Here is an example :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"// slices/slicing-copy/main.go\\npackage main\\n\\nimport \\\"fmt\\\"\\n\\nfunc main() {\\n customers := [4]string{\\\"John Doe\\\", \\\"Helmuth Verein\\\", \\\"Dany Beril\\\", \\\"Oliver Lump\\\"}\\n customersSlice := customers[0:1]\\n fmt.Println(customersSlice)\\n // modify original array\\n customers[0] = \\\"John Doe Modified\\\"\\n fmt.Println(\\\"After modification of original array\\\")\\n fmt.Println(customersSlice)\\n}\")])]),_c('p',[_vm._v(\"This program output :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"[John Doe]\\nAfter modification of the original array\\n[John Doe Modified]\")])]),_c('p',[_vm._v(\"When we create the slice \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"customersSlice\")])]),_vm._v(\" the data is not copied, but \"),_c('strong',[_vm._v(\"a reference to the original data\")]),_vm._v(\" is taken. The value at index 0 in the slice will change.\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"slicing-a-string\"}}),_c('h1',{attrs:{\"data-number\":\"7\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"7\")]),_vm._v(\" Slicing a string \"),_c('a',{attrs:{\"href\":\"#slicing-a-string\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"You can also slice a string! The result of this operation is another string :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"hotelName := \\\"Go Dev Hotel\\\"\\ns := hotelName[0:6]\\nfmt.Println(s)\")])]),_c('p',[_vm._v(\"This program will output : \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"Go Dev\")])]),_vm._v(\". Strings in Go are \"),_c('strong',[_vm._v(\"immutable\")]),_vm._v(\". Once created and saved in memory, you cannot modify the string. Let’s see an example:\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"// slices/slicing-string/main.go\\npackage main\\n\\nimport \\\"fmt\\\"\\n\\nfunc main() {\\n hotelName := \\\"Go Dev Hotel\\\"\\n s := hotelName[0:6]\\n fmt.Println(s)\\n hotelName = \\\"Java Dev Hotel\\\"\\n fmt.Println(s)\\n}\")])]),_c('p',[_vm._v(\"In this snippet, we first create a string (\"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"hotelName\")])]),_vm._v(\") Then we slice it. The slice is named \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"s\")])]),_vm._v(\". Then we modify the value of \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"hotelName\")])]),_vm._v(\".\")]),_c('p',[_vm._v(\"We might expect that \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"s\")])]),_vm._v(\" will be modified, but it is not. The program will output :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"Go Dev\\nGo Dev\")])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"length\"}}),_c('BuyCopyInvite'),_c('h1',{attrs:{\"data-number\":\"8\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"8\")]),_vm._v(\" Length \"),_c('a',{attrs:{\"href\":\"#length\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"The length is the \"),_c('strong',[_vm._v(\"number of elements that are into the slice\")]),_vm._v(\". The built-in function \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"len\")])]),_vm._v(\" return the length of a slice :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"vatRates := []float64{4.65, 4, 15, 20}\\nfmt.Printf(\\\"length of slice vatRates is %d\\\", len(vatRates))\")])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"internal-memory-representation\"}}),_c('h1',{attrs:{\"data-number\":\"9\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"9\")]),_vm._v(\" Internal memory representation \"),_c('a',{attrs:{\"href\":\"#internal-memory-representation\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"Internally a slice is a struct that contains \"),_c('strong',[_vm._v(\"a pointer to an array\")]),_vm._v(\".\")]),_c('ul',[_c('li',[_c('p',[_vm._v(\"When we create a slice, Go will create an array. You will never have access to it. This array is \"),_c('strong',[_vm._v(\"internal\")]),_vm._v(\".\")])]),_c('li',[_c('p',[_vm._v(\"When we slice an array, Go will take a pointer to that existing array.\")])])]),_c('figure',[_c('b-img',{staticClass:\"img-book\",attrs:{\"src\":require('@/assets/images/slice_internal_rep.png'),\"alt\":\"Slice internal representation[fig:Slice-internal-representation]\",\"fluid\":\"\",\"thumbnail\":\"\"}}),_c('figcaption',{attrs:{\"aria-hidden\":\"true\"}},[_vm._v(\"Slice internal representation\"),_c('span',{attrs:{\"id\":\"fig:Slice-internal-representation\",\"label\":\"fig:Slice-internal-representation\"}},[_vm._v(\"[fig:Slice-internal-representation]\")])])],1),_c('p',[_vm._v(\"The slice is the conjunction of three elements :\")]),_c('ol',{attrs:{\"type\":\"1\"}},[_c('li',[_c('p',[_vm._v(\"A pointer to an underlying array. The pointer points to the underlying array where the slice begins. It points to the \"),_c('strong',[_vm._v(\"first element of the slice\")]),_vm._v(\".\")])]),_c('li',[_c('p',[_vm._v(\"The length of the slice (an \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"uint\")])]),_vm._v(\")\")])]),_c('li',[_c('p',[_vm._v(\"The capacity. (an \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"uint\")])]),_vm._v(\") (see next section)\")])])]),_c('p',[_vm._v(\"When we create a slice in our program, an array will be created. This array will contain the elements of the slice. Internally Go will store a pointer to the first element of this array (see figure \"),_c('a',{attrs:{\"href\":\"#fig:Slice-internal-example\",\"data-reference-type\":\"ref\",\"data-reference\":\"fig:Slice-internal-example\"}},[_vm._v(\"2\")]),_vm._v(\").\")]),_c('figure',[_c('b-img',{staticClass:\"img-book\",attrs:{\"src\":require('@/assets/images/slice_inernal_example.png'),\"alt\":\"Slice internal example[fig:Slice-internal-example]\",\"fluid\":\"\",\"thumbnail\":\"\"}}),_c('figcaption',{attrs:{\"aria-hidden\":\"true\"}},[_vm._v(\"Slice internal example\"),_c('span',{attrs:{\"id\":\"fig:Slice-internal-example\",\"label\":\"fig:Slice-internal-example\"}},[_vm._v(\"[fig:Slice-internal-example]\")])])],1),_c('p',[_vm._v(\"A slice can also be created by slicing an existing array. In this case, the slice’s capacity is not equal to its length.\")]),_c('figure',[_c('b-img',{staticClass:\"img-book\",attrs:{\"src\":require('@/assets/images/slice_internal_when_slicing.png'),\"alt\":\"Slice internal example when an array is sliced[fig:Slice-internal-example-when-array-sliced]\",\"fluid\":\"\",\"thumbnail\":\"\"}}),_c('figcaption',{attrs:{\"aria-hidden\":\"true\"}},[_vm._v(\"Slice internal example when an array is sliced\"),_c('span',{attrs:{\"id\":\"fig:Slice-internal-example-when-array-sliced\",\"label\":\"fig:Slice-internal-example-when-array-sliced\"}},[_vm._v(\"[fig:Slice-internal-example-when-array-sliced]\")])])],1),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"capacity\"}}),_c('h1',{attrs:{\"data-number\":\"10\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"10\")]),_vm._v(\" Capacity \"),_c('a',{attrs:{\"href\":\"#capacity\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"The capacity is an unsigned integer. It represents the “the number of elements for which there is space allocated in the underlying array” Go Specification : https://golang.org/ref/spec#Length_and_capacity. To retrieve the capacity of a slice, you can use the builtin function \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"cap(slice)\")])]),_vm._v(\".\")]),_c('p',[_vm._v(\"Let’s take an example to understand the concept of capacity :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"names := [4]string{\\\"John\\\", \\\"Bob\\\", \\\"Claire\\\", \\\"Nik\\\"}\\nmySlice := names[1:3]\\nfmt.Println(\\\"length:\\\", len(mySlice))\\nfmt.Println(\\\"capacity:\\\", cap(mySlice))\")])]),_c('p',[_vm._v(\"This program will output :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"length: 2\\ncapacity: 3\")])]),_c('p',[_vm._v(\"We created a slice named \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"mySlice\")])]),_vm._v(\" by slicing the \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"names\")])]),_vm._v(\" array. We take everything between the element at index one and the element at index 2 (3-1). \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"mySlice\")])]),_vm._v(\" has a length of 2 (there are two elements inside). But the capacity is equal to 3. There is space allocated for three elements in the underlying array (names).\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"length-and-capacity-relation\"}}),_c('h1',{attrs:{\"data-number\":\"11\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"11\")]),_vm._v(\" Length and capacity relation \"),_c('a',{attrs:{\"href\":\"#length-and-capacity-relation\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_c('strong',[_vm._v(\"Capacity is always greater or equal to the length\")]),_vm._v(\". It does not make sense to have a capacity that is inferior to the length. Imagine a slice with a length of 3 and a capacity of 2. We can store only two elements in the underlying array!\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"slices-in-function-parameters\"}}),_c('BuyCopyInvite'),_c('h1',{attrs:{\"data-number\":\"12\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"12\")]),_vm._v(\" Slices in function parameters \"),_c('a',{attrs:{\"href\":\"#slices-in-function-parameters\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"A function that takes a slice as parameter can change the underlying array. Why? Because a slice is \"),_c('u',[_vm._v(\"internally\")]),_vm._v(\" a pointer to an underlying array. Here is an example :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"// slices/as-fct-parameters/main.go\\npackage main\\n\\nimport \\\"fmt\\\"\\n\\nfunc main() {\\n s := []int{1, 2, 3}\\n multiply(s, 2)\\n fmt.Println(s)\\n //[2 4 6]\\n}\\n\\nfunc multiply(slice []int, factor int) {\\n for i := 0; i < len(slice); i++ {\\n slice[i] = slice[i] * factor\\n }\\n}\")])]),_c('p',[_vm._v(\"Here we define a slice called \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"s\")])]),_vm._v(\" (composed of integers). We create a function \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"multiply\")])]),_vm._v(\" that takes a slice of int and a \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"factor\")])]),_vm._v(\" (int) as parameter. The objective of this function is to multiply each element of a slice by a \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"factor\")])]),_vm._v(\". When \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"s\")])]),_vm._v(\" is created Go will internally create an array that will contain the values 1,2 and 3. It will also create a pointer to that array. When we pass \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"s\")])]),_vm._v(\" to the function \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"multiply\")])]),_vm._v(\", it will modify the underlying array. \"),_c('strong',[_c('u',[_vm._v(\"Slices are pointers by nature\")])]),_vm._v(\".\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"common-error\"}}),_c('h2',{attrs:{\"data-number\":\"12.1\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"12.1\")]),_vm._v(\" Common error \"),_c('a',{attrs:{\"href\":\"#common-error\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('ul',[_c('li',[_c('p',[_vm._v(\"When you pass a slice to a function, the function can modify the slice by changing the underlying array values\")])]),_c('li',[_c('p',[_vm._v(\"When you add elements to the slice inside the function and your slice reaches its maximum capacity, the runtime allocates a new underlying array.\")])]),_c('li',[_c('p',[_vm._v(\"That behavior is normal; however, at the end of the function execution, the elements added to the slice will not be present as you might expect.\")])])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"example\"}}),_c('h3',{attrs:{\"data-number\":\"12.1.1\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"12.1.1\")]),_vm._v(\" Example: \"),_c('a',{attrs:{\"href\":\"#example\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('ul',[_c('li',[_vm._v(\"Let’s take an example to demonstrate this:\")])]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"// slices/common-error-function/main.go\\npackage main\\n\\nimport \\\"fmt\\\"\\n\\nfunc main() {\\n languages := []string{\\\"Java\\\", \\\"PHP\\\", \\\"C\\\"}\\n fmt.Println(\\\"Capacity :\\\", cap(languages))\\n // Capacity : 3\\n \\n // call function\\n addGo(languages)\\n \\n fmt.Println(\\\"Capacity :\\\", cap(languages))\\n // Capacity : 3\\n fmt.Println(languages)\\n // [Java PHP C]\\n // what ! , where is Go ?????\\n}\\n\\nfunc addGo(languages []string) {\\n languages = append(languages, \\\"Go\\\")\\n fmt.Println(\\\"in function, capacity\\\", cap(languages))\\n}\")])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"explanations\"}}),_c('h3',{attrs:{\"data-number\":\"12.1.2\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"12.1.2\")]),_vm._v(\" Explanations \"),_c('a',{attrs:{\"href\":\"#explanations\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('ul',[_c('li',[_c('p',[_vm._v(\"We create a function addGo that will append an element to a slice of strings.\")])]),_c('li',[_c('p',[_vm._v(\"In the main function, we initialize a slice of strings named languages.\")])]),_c('li',[_c('p',[_vm._v(\"We initialize the slice with three elements. Its capacity and length are equal to 3.\")])]),_c('li',[_c('p',[_vm._v(\"We then call the function addGo. After the call, we print the slice, and no elements have been appended.\")])])]),_c('p',[_vm._v(\"What happens in the function?\")]),_c('ul',[_c('li',[_c('p',[_vm._v(\"When the function is called, the runtime makes a copy of the slice.\")])]),_c('li',[_c('p',[_vm._v(\"A new underlying array is allocated inside the function because the capacity is exceeded.\")])]),_c('li',[_c('p',[_vm._v(\"The reference to the underlying array that the slice holds internally has been changed.\")])]),_c('li',[_c('p',[_vm._v(\"But, it has been changed only on the copy of the slice.\")])]),_c('li',[_c('p',[_vm._v(\"When the function returns, the copied slice is destroyed. The slice languages still reference the old underlying array.\")])])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"how-to-avoid-that\"}}),_c('h3',{attrs:{\"data-number\":\"12.1.3\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"12.1.3\")]),_vm._v(\" How to avoid that \"),_c('a',{attrs:{\"href\":\"#how-to-avoid-that\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('ul',[_c('li',[_c('p',[_vm._v(\"addGo should accept a pointer to a slice of strings as input parameter.\")])]),_c('li',[_c('p',[_vm._v(\"In that condition the slice is not copied.\")])]),_c('li',[_c('p',[_vm._v(\"The reference to the underlying array is updated in the original slice.\")])])]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"// slices/common-error-function-fix/main.go\\npackage main\\n\\nimport \\\"fmt\\\"\\n\\nfunc main() {\\n languages := []string{\\\"Java\\\", \\\"PHP\\\", \\\"C\\\"}\\n fmt.Println(\\\"Capacity :\\\", cap(languages))\\n // Capacity : 3\\n\\n // call function\\n addGoFixed(&languages)\\n\\n fmt.Println(\\\"Capacity :\\\", cap(languages))\\n // Capacity : 6\\n fmt.Println(languages)\\n // [Java PHP C Go]\\n}\\n\\nfunc addGoFixed(languages *[]string) {\\n *languages = append(*languages, \\\"Go\\\")\\n}\")])]),_c('ul',[_c('li',[_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"*\")])]),_vm._v(\" means “follow the address”, this is the dereferencing operator (if that’s not clear, take a look at the chapter dedicated to pointers)\")])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"make-built-in-function\"}}),_c('h1',{attrs:{\"data-number\":\"13\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"13\")]),_vm._v(\" make built-in function \"),_c('a',{attrs:{\"href\":\"#make-built-in-function\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"With the make builtin, you can create a slice with a specified length and capacity. \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"make\")])]),_vm._v(\" will return a new slice. You must provide the type of elements you want to put into the slice and its length and capacity. Note that the capacity is optional. If not provided, the capacity will be equal to the length.\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"test := make([]int,2,10)\")])]),_c('p',[_vm._v(\"The slice \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"test\")])]),_vm._v(\" will have a length of 2 and a capacity of 10. Be careful the capacity cannot be inferior to the length; otherwise, it will not compile!\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"copy-builtin-function\"}}),_c('h1',{attrs:{\"data-number\":\"14\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"14\")]),_vm._v(\" copy builtin function \"),_c('a',{attrs:{\"href\":\"#copy-builtin-function\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"Copy is a handy function that allows you to copy all slice elements (called source) into another slice (called destination). The copy function takes two slices as parameters. The built-in function will copy all second slice elements into the first one. We call the first slice the destination and the second one the source.\")]),_c('p',[_vm._v(\"The function returns an integer which is the number of elements successfully copied.\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"func copy(dst, src []Type) int\")])]),_c('p',[_vm._v(\"Note that the number of elements copied will be the minimum between the source’s length and the length of the destination.\")]),_c('p',[_vm._v(\"For instance, a slice has four elements, and the source slice has 2. Then the number of elements copied will be 2. If the destination has a length of 1, then the number of elements copied will be just one. The built-in copy does not increase the length of the destination slice. If you want to have the same slice, you have to provide a destination slice with the same length as the source slice.\")]),_c('figure',[_c('b-img',{staticClass:\"img-book\",attrs:{\"src\":require('@/assets/images/slices_copy.png'),\"alt\":\"Usage of copy\",\"fluid\":\"\",\"thumbnail\":\"\"}}),_c('figcaption',{attrs:{\"aria-hidden\":\"true\"}},[_vm._v(\"Usage of copy\")])],1),_c('p',[_vm._v(\"Here is a usage example of the copy builtin :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"// slices/copy-builtin/main.go\\npackage main\\n\\nimport \\\"fmt\\\"\\n\\nfunc main() {\\n // destination > source\\n a := []int{10, 20, 30, 40}\\n b := []int{1, 1, 1, 1, 1}\\n copy(b, a)\\n fmt.Printf(\\\"a: %v - b : %v\\\\n\\\", a, b)\\n // Output : a: [10 20 30 40] - b : [10 20 30 40 1]\\n\\n // source > destination\\n a = []int{10, 20, 30, 40}\\n b = []int{1, 1}\\n copy(b, a)\\n fmt.Printf(\\\"a: %v - b : %v\\\\n\\\", a, b)\\n // Output : a: [10 20 30 40] - b : [10 20]\\n\\n // source = destination\\n a = []int{10, 20, 30, 40}\\n b = make([]int, 4)\\n copy(b, a)\\n fmt.Printf(\\\"a: %v - b : %v\\\\n\\\", a, b)\\n // Output : a: [10 20 30 40] - b : [10 20 30 40]\\n}\")])]),_c('p',[_vm._v(\"I had difficulties remembering that the first argument of copy is the destination and the other one is the source.\")]),_c('p',[_vm._v(\"Here is a mnemotechnic tip to remember: the parameters’ name is in alphabetical order. D then S!\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"append-builtin-function\"}}),_c('h1',{attrs:{\"data-number\":\"15\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"15\")]),_vm._v(\" append builtin function \"),_c('a',{attrs:{\"href\":\"#append-builtin-function\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"The append function will add element(s) at the end of a slice.\")]),_c('figure',[_c('b-img',{staticClass:\"img-book\",attrs:{\"src\":require('@/assets/images/append.png'),\"alt\":\"Append builtin\",\"fluid\":\"\",\"thumbnail\":\"\"}}),_c('figcaption',{attrs:{\"aria-hidden\":\"true\"}},[_vm._v(\"Append builtin\")])],1),_c('p',[_vm._v(\"Append accepts as first parameter a slice and then one or several elements to append to it. We say that append is a variadic function.\")]),_c('p',[_vm._v(\"A function is said to be \"),_c('strong',[_vm._v(\"variadic\")]),_vm._v(\" when it has a \"),_c('strong',[_vm._v(\"variable number of parameters\")]),_vm._v(\". The function definition does not fix the number of parameters. In the signature of the function, you can detect this by looking for the three dots \"),_c('strong',[_vm._v(\"\\\"...\")]),_vm._v(\"\\\".\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"func append(slice []Type, elems ...Type) []Type\")])]),_c('p',[_vm._v(\"Here the function takes a slice as a parameter but also elems that are of type \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"Type\")])]),_vm._v(\" the dots means that we can provide \"),_c('strong',[_vm._v(\"several values for the second parameter elems\")]),_vm._v(\". Append returns the slice modified. Let’s take an example usage :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"// slices/append/main.go\\npackage main\\n\\nimport \\\"fmt\\\"\\n\\nfunc main() {\\n a := []int{10, 20, 30, 40}\\n a = append(a, 50)\\n fmt.Println(a)\\n // [10 20 30 40 50]\\n\\n}\")])]),_c('p',[_vm._v(\"Here we first create a slice \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"a\")])]),_vm._v(\" and then we append the integer \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"50\")])]),_vm._v(\" to it by using \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"append\")])]),_c('strong',[_vm._v(\".\")]),_vm._v(\"Note that the \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"append\")])]),_vm._v(\" function will \"),_c('strong',[_vm._v(\"return the modified version of\")]),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"a\")])]),_c('strong',[_vm._v(\".\")]),_vm._v(\" Therefore we must reassign the modified version to the variable \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"a\")])]),_c('strong',[_vm._v(\".\")])]),_c('p',[_vm._v(\"At the end of the script, we print \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"a\")])]),_vm._v(\" and we get the slice a with new elements inside. Append has resized our original slice automatically. If the underlying array’s capacity is insufficient, the append function will allocate a new one.\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"how-slices-grow\"}}),_c('BuyCopyInvite'),_c('h1',{attrs:{\"data-number\":\"16\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"16\")]),_vm._v(\" How slices grow \"),_c('a',{attrs:{\"href\":\"#how-slices-grow\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"With the builtin \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"append\")])]),_vm._v(\" we can add more data at the end of a slice. Internally when we append a value to a slice, we set a value in the underlying array. The underlying array has a specific size. If there is no space left on the array, Go will create a new array with sufficient space. Go will then copy all the elements from the previous array to the new array. Let’s take an example :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"s := []uint{10, 20, 30, 40}\\nfmt.Printf(\\\"Length : %d - Capacity : %d\\\\n\\\", len(s), cap(s))\\ns = append(s, 50)\\nfmt.Printf(\\\"Length : %d - Capacity : %d\\\\n\\\", len(s), cap(s))\\ns = append(s, 60)\\nfmt.Printf(\\\"Length : %d - Capacity : %d\\\\n\\\", len(s), cap(s))\\ns = append(s, 70)\\nfmt.Printf(\\\"Length : %d - Capacity : %d\\\\n\\\", len(s), cap(s))\\ns = append(s, 80)\\nfmt.Printf(\\\"Length : %d - Capacity : %d\\\\n\\\", len(s), cap(s))\\ns = append(s, 90)\\nfmt.Printf(\\\"Length : %d - Capacity : %d\\\\n\\\", len(s), cap(s))\")])]),_c('p',[_vm._v(\"In this program, we create a slice s with four initial elements then we append elements to it. We log the slice’s length and its capacity after each step. The program outputs :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"Length : 4 - Capacity : 4\\nLength : 5 - Capacity : 8\\nLength : 6 - Capacity : 8\\nLength : 7 - Capacity : 8\\nLength : 8 - Capacity : 8\\nLength : 9 - Capacity : 16\")])]),_c('ul',[_c('li',[_c('p',[_vm._v(\"At first, we have four elements and an underlying array of 4 elements.\")])]),_c('li',[_c('p',[_vm._v(\"When we add one element to the slice, the capacity increase to 8.\")]),_c('ul',[_c('li',[_c('p',[_vm._v(\"It means that a new underlying array of 8 elements has been created.\")])]),_c('li',[_c('p',[_vm._v(\"The elements present in the old array are all \"),_c('strong',[_vm._v(\"copied\")]),_vm._v(\" to the new array.\")])])])]),_c('li',[_c('p',[_vm._v(\"When we add \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"90\")])]),_vm._v(\" to the slice \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"length == capacity\")])]),_vm._v(\". The underlying array is full.\")]),_c('ul',[_c('li',[_c('p',[_vm._v(\"A new array of \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"16\")])]),_vm._v(\" elements is created.\")])]),_c('li',[_c('p',[_vm._v(\"The elements present in the old array are all copied to the new one.\")])])])])]),_c('p',[_vm._v(\"On figure \"),_c('a',{attrs:{\"href\":\"#fig:Slice-growing\",\"data-reference-type\":\"ref\",\"data-reference\":\"fig:Slice-growing\"}},[_vm._v(\"4\")]),_vm._v(\" you can see how the slice is growing.\")]),_c('figure',[_c('b-img',{staticClass:\"img-book\",attrs:{\"src\":require('@/assets/images/slice_growing.png'),\"alt\":\"Slice growing[fig:Slice-growing]\",\"fluid\":\"\",\"thumbnail\":\"\"}}),_c('figcaption',{attrs:{\"aria-hidden\":\"true\"}},[_vm._v(\"Slice growing\"),_c('span',{attrs:{\"id\":\"fig:Slice-growing\",\"label\":\"fig:Slice-growing\"}},[_vm._v(\"[fig:Slice-growing]\")])])],1),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"performance-impact\"}}),_c('h4',{attrs:{\"data-number\":\"16.0.0.1\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"16.0.0.1\")]),_vm._v(\" Performance impact \"),_c('a',{attrs:{\"href\":\"#performance-impact\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"When the underlying array is full, a new array is created, and your data is copied into the new array. This operation can impact the performance of your program. Let’s take an example :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"func grow1() {\\n s := []uint{10, 20, 30, 40}\\n s = append(s, 50)\\n s = append(s, 60)\\n s = append(s, 70)\\n s = append(s, 80)\\n s = append(s, 90)\\n}\\n\\nfunc grow2() {\\n s := make([]uint, 9)\\n s = append(s, 10, 20, 30, 40)\\n s = append(s, 50)\\n s = append(s, 60)\\n s = append(s, 70)\\n s = append(s, 80)\\n s = append(s, 90)\\n}\")])]),_c('p',[_vm._v(\"The function \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"grow2\")])]),_vm._v(\" is relatively faster than \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"grow1\")])]),_vm._v(\". In \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"grow2\")])]),_vm._v(\" we create a slice using the built-in \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"make\")])]),_vm._v(\". We explicitly say that we want a length of 9 (and thus a capacity of 9). The runtime will create the underlying array once. In \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"grow1\")])]),_vm._v(\" Go will create two underlying arrays (and copy all element from one array to another one). Here is a benchmark (see chapter \"),_c('a',{attrs:{\"href\":\"#chap:Benchmark\",\"data-reference-type\":\"ref\",\"data-reference\":\"chap:Benchmark\"}},[_vm._v(\"[chap:Benchmark]\")]),_vm._v(\") that I run on my computer Mac book Pro - 2,2 GHz Quad-Core Intel Core i7 - 16 GB 1600 MHz DDR3. \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"grow1\")])]),_vm._v(\" : average: 94.8 nanoseconds per operation\")]),_c('p',[_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"grow2\")])]),_vm._v(\" : average: 58.7 nanoseconds per operation\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"slice-elements-index\"}}),_c('h1',{attrs:{\"data-number\":\"17\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"17\")]),_vm._v(\" Slice elements index \"),_c('a',{attrs:{\"href\":\"#slice-elements-index\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"Elements in a slice are indexed. The indexing starts at \"),_c('strong',[_vm._v(\"0\")]),_vm._v(\". In the computer science world, we start counting at 0. It is often a source of errors for beginners. Please keep that in mind.\")]),_c('figure',[_c('b-img',{staticClass:\"img-book\",attrs:{\"src\":require('@/assets/images/slice_indexing.png'),\"alt\":\"Indexes of a slice\",\"fluid\":\"\",\"thumbnail\":\"\"}}),_c('figcaption',{attrs:{\"aria-hidden\":\"true\"}},[_vm._v(\"Indexes of a slice\")])],1),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"access-an-element-by-its-index\"}}),_c('h1',{attrs:{\"data-number\":\"18\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"18\")]),_vm._v(\" Access an element by its index \"),_c('a',{attrs:{\"href\":\"#access-an-element-by-its-index\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"So if you want to access the element at index three from a slice a, you can use the following code :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"elementAtIndex3 := a[3]\")])]),_c('p',[_vm._v(\"You have to be sure that the element at index exists. Otherwise, you might face a \"),_c('strong',[_vm._v(\"runtime panic\")]),_vm._v(\". For instance, the following program will compile (the compiler will not check the index existence). Here is an example :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"// slices/access-element-index/main.go\\npackage main\\n\\nimport \\\"fmt\\\"\\n\\nfunc main() {\\n a := []int{10, 20, 30, 40}\\n fmt.Println(a[8])\\n}\")])]),_c('p',[_vm._v(\"This program will compile. We want to access the element at index 8. But this element does not exists. Which makes the program panic :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"$ go run main.go\\npanic: runtime error: index out of range\")])]),_c('p',[_vm._v(\"If you try to access an element of an array out of index, the program will not compile. Arrays have a length known at compile-time; slices have a length that can grow during program execution.\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"iterate-over-elements-of-a-slice\"}}),_c('h1',{attrs:{\"data-number\":\"19\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"19\")]),_vm._v(\" Iterate over elements of a slice \"),_c('a',{attrs:{\"href\":\"#iterate-over-elements-of-a-slice\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"To iterate over the elements of a slice, you can use a for loop :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"names := []string{\\\"John\\\", \\\"Bob\\\", \\\"Claire\\\", \\\"Nik\\\"}\\nfor i, name := range names {\\n fmt.Println(\\\"Element at index\\\", i, \\\"=\\\", name)\\n}\")])]),_c('p',[_vm._v(\"This program will output :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"Element at index 0 = John\\nElement at index 1 = Bob\\nElement at index 2 = Claire\\nElement at index 3 = Nik\")])]),_c('p',[_vm._v(\"At each iteration :\")]),_c('ul',[_c('li',[_c('p',[_vm._v(\"The value of \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"i\")])]),_vm._v(\" is equal to the index iteration value.\")])]),_c('li',[_c('p',[_vm._v(\"The value of \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"name\")])]),_vm._v(\" is equal to the value of the slice element at index \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"i\")])]),_vm._v(\".\")])])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"attention-danger-for-loops-that-modify-a-slice\"}}),_c('h2',{attrs:{\"data-number\":\"19.1\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"19.1\")]),_vm._v(\" Attention danger: for loops that modify a slice \"),_c('a',{attrs:{\"href\":\"#attention-danger-for-loops-that-modify-a-slice\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"Imagine that you need to modify each element of a slice. A for loop with a range expression can do the job. But there is a beginner mistake to avoid.\")]),_c('p',[_vm._v(\"Let’s take an example :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"// Warning : there is a trap!\\nnames := []string{\\\"John\\\", \\\"Bob\\\", \\\"Claire\\\", \\\"Nik\\\"}\\nfor _, name := range names {\\n name = strings.ToUpper(name)\\n}\\nfmt.Println(names)\")])]),_c('p',[_vm._v(\"This program will output :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"[John Bob Claire Nik]\")])]),_c('p',[_vm._v(\"The original slice has not been modified! The range expression will copy the value of each element to the local variable \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"name\")])]),_vm._v(\". \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"name = strings.ToUpper(name)\")])]),_vm._v(\" will modify only the local variable. The original slice names are left untouched!\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"for i := range names {\\n names[i] = strings.ToUpper(names[i])\\n}\\nfmt.Println(names)\")])]),_c('p',[_vm._v(\"The program will output :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"[JOHN BOB CLAIRE NIK]\")])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"merge-two-slices\"}}),_c('BuyCopyInvite'),_c('h1',{attrs:{\"data-number\":\"20\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"20\")]),_vm._v(\" Merge two slices \"),_c('a',{attrs:{\"href\":\"#merge-two-slices\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"The following code snippet will merge \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"b\")])]),_vm._v(\" and \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"c\")])]),_vm._v(\" :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"b := append(b, c...)\")])]),_c('p',[_vm._v(\"Note that \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"b\")])]),_vm._v(\" and \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"c\")])]),_vm._v(\" have to be of the same type.\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"test := append([]int{10,20}, []int{30,40,50}...)\")])]),_c('p',[_vm._v(\"The variable test will be equal to the next slice :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"[10,20,30,40,50]\")])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"find-an-element-in-a-slice\"}}),_c('h1',{attrs:{\"data-number\":\"21\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"21\")]),_vm._v(\" Find an element in a slice \"),_c('a',{attrs:{\"href\":\"#find-an-element-in-a-slice\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"There is no built-in function for that.\")]),_c('p',[_vm._v(\"You have to iterate over each slice element and check if the element is equal to the one you are looking for.\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"names := []string{\\\"John\\\", \\\"Bob\\\", \\\"Claire\\\", \\\"Nik\\\"}\\nfor i, name := range names {\\n if name == \\\"Claire\\\" {\\n fmt.Println(\\\"Claire found at index\\\", i)\\n }\\n}\\n// Output : Claire found at index 2\")])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"remove-an-element-at-index-algorithm-from-httpsgithub.comgolanggowikislicetricks\"}}),_c('h1',{attrs:{\"data-number\":\"22\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"22\")]),_vm._v(\" Remove an element at index Algorithm from : https://github.com/golang/go/wiki/SliceTricks \"),_c('a',{attrs:{\"href\":\"#remove-an-element-at-index-algorithm-from-httpsgithub.comgolanggowikislicetricks\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"Let’s say we have a slice of length 10 :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"[1,2,3,4,5,6,7,8,9,10]\")])]),_c('p',[_vm._v(\"We want to eliminate the element at index 8 (which is 9). The technique is to create two slices. The first slice will contain the elements from index 0 to index 7. The second slice will contain just one element: the one at index 9.\")]),_c('p',[_vm._v(\"We then merge the two slices.\")]),_c('figure',[_c('b-img',{staticClass:\"img-book\",attrs:{\"src\":require('@/assets/images/slice_delete_one_element.png'),\"alt\":\"Delete the element at index 8[fig:Delete-the-element-at-index]\",\"fluid\":\"\",\"thumbnail\":\"\"}}),_c('figcaption',{attrs:{\"aria-hidden\":\"true\"}},[_vm._v(\"Delete the element at index 8\"),_c('span',{attrs:{\"id\":\"fig:Delete-the-element-at-index\",\"label\":\"fig:Delete-the-element-at-index\"}},[_vm._v(\"[fig:Delete-the-element-at-index]\")])])],1),_c('p',[_vm._v(\"Here is the code to do this with Go :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"a := []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}\\na = append(a[:8], a[9:]...)\")])]),_c('p',[_vm._v(\"First, we create a slice called a.\")]),_c('p',[_vm._v(\"Then use the built-in append to concatenate two slices :\")]),_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(\"mySlice[:8]\")])]),_vm._v(\" : which is \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"mySlice\")])]),_vm._v(\" reduced to elements at indexes \"),_c('strong',[_vm._v(\"0 to 7.\")]),_vm._v(\"(remember that the index after the “:” is always excluded). This is B in the figure \"),_c('a',{attrs:{\"href\":\"#fig:Delete-the-element-at-index\",\"data-reference-type\":\"ref\",\"data-reference\":\"fig:Delete-the-element-at-index\"}},[_vm._v(\"5\")])])]),_c('li',[_c('p',[_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"mySlice[9:]\")])]),_vm._v(\" : which contains all elements of \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"mySlice\")])]),_vm._v(\" from index nine included. This is C in the figure \"),_c('a',{attrs:{\"href\":\"#fig:Delete-the-element-at-index\",\"data-reference-type\":\"ref\",\"data-reference\":\"fig:Delete-the-element-at-index\"}},[_vm._v(\"5\")])])])]),_c('p',[_vm._v(\"Then we concatenate the two slices to obtain our new slice that does not contain the element at index 8!\")]),_c('p',[_vm._v(\"Here is a generalization of the algorithm. If you have a slice s and you want to delete the element at index i \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"i\n \n
\n \n
\n \n \n \n\t\t\t\t\n \n \n\t\t\t\t\t\n \n
\n

1 What will you learn in this chapter?

\n
    \n
  • What is a slice?

  • \n
  • How to create a slice.

  • \n
  • How to iterate over a slice

  • \n
  • How to create multi-dimensional slices.

  • \n
  • How to put an element at a specific index in a slice.

  • \n
  • How to use append and copy.

  • \n
\n
\n

2 Technical concepts covered

\n
    \n
  • Slice

  • \n
  • Length

  • \n
  • Capacity

  • \n
  • Array

  • \n
  • Copy

  • \n
  • Pointer to

  • \n
  • Variadic function

  • \n
\n
\n

3 Definition

\n

A slice is a growable collection of elements of the same type. It’s growable because you do not fix at compile time the size of your slice; you can add elements during the execution. When you add elements to the slice during the program execution, we say that the slice will grow.

\n

The type of a slice is denoted by []T where T is the name of the type of elements inside the slice.

\n

For instance: []int is a slice of integers.

\n

Note that we do not specify the size of a slice as we do for arrays (see chapter [chap:Arrays]). Inside the square brackets, we don’t specify any length. The zero value of a slice is nil.

\n
\n\n

4 Creation of a new slice

\n
// slices/creation/main.go\npackage main\n\nfunc main() {\n    s := make([]int, 3)\n    s[0] = 12\n    s[2] = 3\n}
\n

Here we define the variable s that is of type []int which is a slice of integers. Then we can fill the slice. We define the elements at indexes 0 and 2.

\n
s2 = []int{10,12}
\n

We define s2which is also a slice of integers, and we set its first two elements.

\n
\n

5 Slicing an array, a pointer to an array, or a slice

\n

A slice is a piece of something. For instance, a slice of cheese is not the complete cheese but only a part of it. In Go, it’s the same you can slice :

\n
    \n
  • an array

  • \n
  • a pointer to an array

  • \n
  • a slice

  • \n
\n

The result of this operation (called slicing) is a slice. To slice an element, four you can use the following syntax :

\n
s := e[low:high]
\n

low and high will allow you to select the range of elements in e.

\n
\n

5.0.1 Example 1

\n
// slices/slicing-array/main.go\npackage main\n\nimport "fmt"\n\nfunc main() {\n    customers := [4]string{"John Doe", "Helmuth Verein", "Dany Beril", "Oliver Lump"}\n    // slice the array\n    customersSlice := customers[0:1]\n    fmt.Println(customersSlice)\n}
\n

This program will output :

\n
[John Doe]
\n

We have an array of strings named customers. This slice contains 4 elements.

\n

We create a slice from this array. customers[0:1] will create a slice containing the element of the array from index 0 to index 1-1=0. In other words, we take the first element.

\n
\n

5.0.2 Example 2

\n
customersSlice2 := customers[2:4]\nfmt.Println(customersSlice2)
\n

This program will output :

\n
[Dany Beril Oliver Lump]
\n

We take the elements from indice 2 to index 4-1=3

\n
\n

5.0.3 Remember

\n

When you write :

\n
s := e[low:high]
\n

You have to subtract one from high to get the highest element index in e.

\n

Another way to remember it is that we take the elements from low to high excluded.

\n
\n

6 Do slicing copy data?

\n

No! Here is an example :

\n
// slices/slicing-copy/main.go\npackage main\n\nimport "fmt"\n\nfunc main() {\n    customers := [4]string{"John Doe", "Helmuth Verein", "Dany Beril", "Oliver Lump"}\n    customersSlice := customers[0:1]\n    fmt.Println(customersSlice)\n    // modify original array\n    customers[0] = "John Doe Modified"\n    fmt.Println("After modification of original array")\n    fmt.Println(customersSlice)\n}
\n

This program output :

\n
[John Doe]\nAfter modification of the original array\n[John Doe Modified]
\n

When we create the slice customersSlice the data is not copied, but a reference to the original data is taken. The value at index 0 in the slice will change.

\n
\n

7 Slicing a string

\n

You can also slice a string! The result of this operation is another string :

\n
hotelName := "Go Dev Hotel"\ns := hotelName[0:6]\nfmt.Println(s)
\n

This program will output : Go Dev. Strings in Go are immutable. Once created and saved in memory, you cannot modify the string. Let’s see an example:

\n
// slices/slicing-string/main.go\npackage main\n\nimport "fmt"\n\nfunc main() {\n    hotelName := "Go Dev Hotel"\n    s := hotelName[0:6]\n    fmt.Println(s)\n    hotelName = "Java Dev Hotel"\n    fmt.Println(s)\n}
\n

In this snippet, we first create a string (hotelName) Then we slice it. The slice is named s. Then we modify the value of hotelName.

\n

We might expect that s will be modified, but it is not. The program will output :

\n
Go Dev\nGo Dev
\n
\n\n

8 Length

\n

The length is the number of elements that are into the slice. The built-in function len return the length of a slice :

\n
vatRates := []float64{4.65, 4, 15, 20}\nfmt.Printf("length of slice vatRates is %d", len(vatRates))
\n
\n

9 Internal memory representation

\n

Internally a slice is a struct that contains a pointer to an array.

\n
    \n
  • When we create a slice, Go will create an array. You will never have access to it. This array is internal.

  • \n
  • When we slice an array, Go will take a pointer to that existing array.

  • \n
\n
\n
Slice internal representation[fig:Slice-internal-representation]
\n
\n

The slice is the conjunction of three elements :

\n
    \n
  1. A pointer to an underlying array. The pointer points to the underlying array where the slice begins. It points to the first element of the slice.

  2. \n
  3. The length of the slice (an uint)

  4. \n
  5. The capacity. (an uint) (see next section)

  6. \n
\n

When we create a slice in our program, an array will be created. This array will contain the elements of the slice. Internally Go will store a pointer to the first element of this array (see figure 2).

\n
\n
Slice internal example[fig:Slice-internal-example]
\n
\n

A slice can also be created by slicing an existing array. In this case, the slice’s capacity is not equal to its length.

\n
\n
Slice internal example when an array is sliced[fig:Slice-internal-example-when-array-sliced]
\n
\n
\n

10 Capacity

\n

The capacity is an unsigned integer. It represents the “the number of elements for which there is space allocated in the underlying array” Go Specification : https://golang.org/ref/spec#Length_and_capacity. To retrieve the capacity of a slice, you can use the builtin function cap(slice).

\n

Let’s take an example to understand the concept of capacity :

\n
names := [4]string{"John", "Bob", "Claire", "Nik"}\nmySlice := names[1:3]\nfmt.Println("length:", len(mySlice))\nfmt.Println("capacity:", cap(mySlice))
\n

This program will output :

\n
length: 2\ncapacity: 3
\n

We created a slice named mySlice by slicing the names array. We take everything between the element at index one and the element at index 2 (3-1). mySlice has a length of 2 (there are two elements inside). But the capacity is equal to 3. There is space allocated for three elements in the underlying array (names).

\n
\n

11 Length and capacity relation

\n

Capacity is always greater or equal to the length. It does not make sense to have a capacity that is inferior to the length. Imagine a slice with a length of 3 and a capacity of 2. We can store only two elements in the underlying array!

\n
\n\n

12 Slices in function parameters

\n

A function that takes a slice as parameter can change the underlying array. Why? Because a slice is internally a pointer to an underlying array. Here is an example :

\n
// slices/as-fct-parameters/main.go\npackage main\n\nimport "fmt"\n\nfunc main() {\n    s := []int{1, 2, 3}\n    multiply(s, 2)\n    fmt.Println(s)\n    //[2 4 6]\n}\n\nfunc multiply(slice []int, factor int) {\n    for i := 0; i < len(slice); i++ {\n        slice[i] = slice[i] * factor\n    }\n}
\n

Here we define a slice called s (composed of integers). We create a function multiply that takes a slice of int and a factor (int) as parameter. The objective of this function is to multiply each element of a slice by a factor. When s is created Go will internally create an array that will contain the values 1,2 and 3. It will also create a pointer to that array. When we pass s to the function multiply, it will modify the underlying array. Slices are pointers by nature.

\n
\n

12.1 Common error

\n
    \n
  • When you pass a slice to a function, the function can modify the slice by changing the underlying array values

  • \n
  • When you add elements to the slice inside the function and your slice reaches its maximum capacity, the runtime allocates a new underlying array.

  • \n
  • That behavior is normal; however, at the end of the function execution, the elements added to the slice will not be present as you might expect.

  • \n
\n
\n

12.1.1 Example:

\n
    \n
  • Let’s take an example to demonstrate this:
  • \n
\n\n
// slices/common-error-function/main.go\npackage main\n\nimport "fmt"\n\nfunc main() {\n    languages := []string{"Java", "PHP", "C"}\n    fmt.Println("Capacity :", cap(languages))\n    // Capacity : 3\n    \n    // call function\n    addGo(languages)\n    \n    fmt.Println("Capacity :", cap(languages))\n    // Capacity : 3\n    fmt.Println(languages)\n    // [Java PHP C]\n    // what ! , where is Go ?????\n}\n\nfunc addGo(languages []string) {\n    languages = append(languages, "Go")\n    fmt.Println("in function, capacity", cap(languages))\n}
\n
\n

12.1.2 Explanations

\n
    \n
  • We create a function addGo that will append an element to a slice of strings.

  • \n
  • In the main function, we initialize a slice of strings named languages.

  • \n
  • We initialize the slice with three elements. Its capacity and length are equal to 3.

  • \n
  • We then call the function addGo. After the call, we print the slice, and no elements have been appended.

  • \n
\n

What happens in the function?

\n
    \n
  • When the function is called, the runtime makes a copy of the slice.

  • \n
  • A new underlying array is allocated inside the function because the capacity is exceeded.

  • \n
  • The reference to the underlying array that the slice holds internally has been changed.

  • \n
  • But, it has been changed only on the copy of the slice.

  • \n
  • When the function returns, the copied slice is destroyed. The slice languages still reference the old underlying array.

  • \n
\n
\n

12.1.3 How to avoid that

\n
    \n
  • addGo should accept a pointer to a slice of strings as input parameter.

  • \n
  • In that condition the slice is not copied.

  • \n
  • The reference to the underlying array is updated in the original slice.

  • \n
\n\n
// slices/common-error-function-fix/main.go\npackage main\n\nimport "fmt"\n\nfunc main() {\n    languages := []string{"Java", "PHP", "C"}\n    fmt.Println("Capacity :", cap(languages))\n    // Capacity : 3\n\n    // call function\n    addGoFixed(&languages)\n\n    fmt.Println("Capacity :", cap(languages))\n    // Capacity : 6\n    fmt.Println(languages)\n    // [Java PHP C Go]\n}\n\nfunc addGoFixed(languages *[]string) {\n    *languages = append(*languages, "Go")\n}
\n
    \n
  • * means “follow the address”, this is the dereferencing operator (if that’s not clear, take a look at the chapter dedicated to pointers)
  • \n
\n
\n

13 make built-in function

\n

With the make builtin, you can create a slice with a specified length and capacity. make will return a new slice. You must provide the type of elements you want to put into the slice and its length and capacity. Note that the capacity is optional. If not provided, the capacity will be equal to the length.

\n
test := make([]int,2,10)
\n

The slice test will have a length of 2 and a capacity of 10. Be careful the capacity cannot be inferior to the length; otherwise, it will not compile!

\n
\n

14 copy builtin function

\n

Copy is a handy function that allows you to copy all slice elements (called source) into another slice (called destination). The copy function takes two slices as parameters. The built-in function will copy all second slice elements into the first one. We call the first slice the destination and the second one the source.

\n

The function returns an integer which is the number of elements successfully copied.

\n
func copy(dst, src []Type) int
\n

Note that the number of elements copied will be the minimum between the source’s length and the length of the destination.

\n

For instance, a slice has four elements, and the source slice has 2. Then the number of elements copied will be 2. If the destination has a length of 1, then the number of elements copied will be just one. The built-in copy does not increase the length of the destination slice. If you want to have the same slice, you have to provide a destination slice with the same length as the source slice.

\n
\n
Usage of copy
\n
\n

Here is a usage example of the copy builtin :

\n
// slices/copy-builtin/main.go\npackage main\n\nimport "fmt"\n\nfunc main() {\n    // destination > source\n    a := []int{10, 20, 30, 40}\n    b := []int{1, 1, 1, 1, 1}\n    copy(b, a)\n    fmt.Printf("a: %v - b : %v\\n", a, b)\n    // Output : a: [10 20 30 40] - b : [10 20 30 40 1]\n\n    // source > destination\n    a = []int{10, 20, 30, 40}\n    b = []int{1, 1}\n    copy(b, a)\n    fmt.Printf("a: %v - b : %v\\n", a, b)\n    // Output : a: [10 20 30 40] - b : [10 20]\n\n    // source = destination\n    a = []int{10, 20, 30, 40}\n    b = make([]int, 4)\n    copy(b, a)\n    fmt.Printf("a: %v - b : %v\\n", a, b)\n    // Output : a: [10 20 30 40] - b : [10 20 30 40]\n}
\n

I had difficulties remembering that the first argument of copy is the destination and the other one is the source.

\n

Here is a mnemotechnic tip to remember: the parameters’ name is in alphabetical order. D then S!

\n
\n

15 append builtin function

\n

The append function will add element(s) at the end of a slice.

\n
\n
Append builtin
\n
\n

Append accepts as first parameter a slice and then one or several elements to append to it. We say that append is a variadic function.

\n

A function is said to be variadic when it has a variable number of parameters. The function definition does not fix the number of parameters. In the signature of the function, you can detect this by looking for the three dots \"...\".

\n
func append(slice []Type, elems ...Type) []Type
\n

Here the function takes a slice as a parameter but also elems that are of type Type the dots means that we can provide several values for the second parameter elems. Append returns the slice modified. Let’s take an example usage :

\n
// slices/append/main.go\npackage main\n\nimport "fmt"\n\nfunc main() {\n    a := []int{10, 20, 30, 40}\n    a = append(a, 50)\n    fmt.Println(a)\n    // [10 20 30 40 50]\n\n}
\n

Here we first create a slice a and then we append the integer 50 to it by using append.Note that the append function will return the modified version ofa. Therefore we must reassign the modified version to the variable a.

\n

At the end of the script, we print a and we get the slice a with new elements inside. Append has resized our original slice automatically. If the underlying array’s capacity is insufficient, the append function will allocate a new one.

\n
\n\n

16 How slices grow

\n

With the builtin append we can add more data at the end of a slice. Internally when we append a value to a slice, we set a value in the underlying array. The underlying array has a specific size. If there is no space left on the array, Go will create a new array with sufficient space. Go will then copy all the elements from the previous array to the new array. Let’s take an example :

\n
s := []uint{10, 20, 30, 40}\nfmt.Printf("Length : %d - Capacity : %d\\n", len(s), cap(s))\ns = append(s, 50)\nfmt.Printf("Length : %d - Capacity : %d\\n", len(s), cap(s))\ns = append(s, 60)\nfmt.Printf("Length : %d - Capacity : %d\\n", len(s), cap(s))\ns = append(s, 70)\nfmt.Printf("Length : %d - Capacity : %d\\n", len(s), cap(s))\ns = append(s, 80)\nfmt.Printf("Length : %d - Capacity : %d\\n", len(s), cap(s))\ns = append(s, 90)\nfmt.Printf("Length : %d - Capacity : %d\\n", len(s), cap(s))
\n

In this program, we create a slice s with four initial elements then we append elements to it. We log the slice’s length and its capacity after each step. The program outputs :

\n
Length : 4 - Capacity : 4\nLength : 5 - Capacity : 8\nLength : 6 - Capacity : 8\nLength : 7 - Capacity : 8\nLength : 8 - Capacity : 8\nLength : 9 - Capacity : 16
\n
    \n
  • At first, we have four elements and an underlying array of 4 elements.

  • \n
  • When we add one element to the slice, the capacity increase to 8.

    \n
      \n
    • It means that a new underlying array of 8 elements has been created.

    • \n
    • The elements present in the old array are all copied to the new array.

    • \n
  • \n
  • When we add 90 to the slice length == capacity. The underlying array is full.

    \n
      \n
    • A new array of 16 elements is created.

    • \n
    • The elements present in the old array are all copied to the new one.

    • \n
  • \n
\n

On figure 4 you can see how the slice is growing.

\n
\n
Slice growing[fig:Slice-growing]
\n
\n
\n

16.0.0.1 Performance impact

\n

When the underlying array is full, a new array is created, and your data is copied into the new array. This operation can impact the performance of your program. Let’s take an example :

\n
func grow1() {\n    s := []uint{10, 20, 30, 40}\n    s = append(s, 50)\n    s = append(s, 60)\n    s = append(s, 70)\n    s = append(s, 80)\n    s = append(s, 90)\n}\n\nfunc grow2() {\n    s := make([]uint, 9)\n    s = append(s, 10, 20, 30, 40)\n    s = append(s, 50)\n    s = append(s, 60)\n    s = append(s, 70)\n    s = append(s, 80)\n    s = append(s, 90)\n}
\n

The function grow2 is relatively faster than grow1. In grow2 we create a slice using the built-in make. We explicitly say that we want a length of 9 (and thus a capacity of 9). The runtime will create the underlying array once. In grow1 Go will create two underlying arrays (and copy all element from one array to another one). Here is a benchmark (see chapter [chap:Benchmark]) that I run on my computer Mac book Pro - 2,2 GHz Quad-Core Intel Core i7 - 16 GB 1600 MHz DDR3. grow1 : average: 94.8 nanoseconds per operation

\n

grow2 : average: 58.7 nanoseconds per operation

\n
\n

17 Slice elements index

\n

Elements in a slice are indexed. The indexing starts at 0. In the computer science world, we start counting at 0. It is often a source of errors for beginners. Please keep that in mind.

\n
\n
Indexes of a slice
\n
\n
\n

18 Access an element by its index

\n

So if you want to access the element at index three from a slice a, you can use the following code :

\n
elementAtIndex3 := a[3]
\n

You have to be sure that the element at index exists. Otherwise, you might face a runtime panic. For instance, the following program will compile (the compiler will not check the index existence). Here is an example :

\n
// slices/access-element-index/main.go\npackage main\n\nimport "fmt"\n\nfunc main() {\n    a := []int{10, 20, 30, 40}\n    fmt.Println(a[8])\n}
\n

This program will compile. We want to access the element at index 8. But this element does not exists. Which makes the program panic :

\n
$ go run main.go\npanic: runtime error: index out of range
\n

If you try to access an element of an array out of index, the program will not compile. Arrays have a length known at compile-time; slices have a length that can grow during program execution.

\n
\n

19 Iterate over elements of a slice

\n

To iterate over the elements of a slice, you can use a for loop :

\n
names := []string{"John", "Bob", "Claire", "Nik"}\nfor i, name := range names {\n    fmt.Println("Element at index", i, "=", name)\n}
\n

This program will output :

\n
Element at index 0 = John\nElement at index 1 = Bob\nElement at index 2 = Claire\nElement at index 3 = Nik
\n

At each iteration :

\n
    \n
  • The value of i is equal to the index iteration value.

  • \n
  • The value of name is equal to the value of the slice element at index i.

  • \n
\n
\n

19.1 Attention danger: for loops that modify a slice

\n

Imagine that you need to modify each element of a slice. A for loop with a range expression can do the job. But there is a beginner mistake to avoid.

\n

Let’s take an example :

\n
// Warning : there is a trap!\nnames := []string{"John", "Bob", "Claire", "Nik"}\nfor _, name := range names {\n    name = strings.ToUpper(name)\n}\nfmt.Println(names)
\n

This program will output :

\n
[John Bob Claire Nik]
\n

The original slice has not been modified! The range expression will copy the value of each element to the local variable name. name = strings.ToUpper(name) will modify only the local variable. The original slice names are left untouched!

\n
for i := range names {\n    names[i] = strings.ToUpper(names[i])\n}\nfmt.Println(names)
\n

The program will output :

\n
[JOHN BOB CLAIRE NIK]
\n
\n\n

20 Merge two slices

\n

The following code snippet will merge b and c :

\n
b := append(b, c...)
\n

Note that b and c have to be of the same type.

\n
test := append([]int{10,20}, []int{30,40,50}...)
\n

The variable test will be equal to the next slice :

\n
[10,20,30,40,50]
\n
\n

21 Find an element in a slice

\n

There is no built-in function for that.

\n

You have to iterate over each slice element and check if the element is equal to the one you are looking for.

\n
names := []string{"John", "Bob", "Claire", "Nik"}\nfor i, name := range names {\n    if name == "Claire" {\n        fmt.Println("Claire found at index", i)\n    }\n}\n// Output : Claire found at index 2
\n
\n

22 Remove an element at index Algorithm from : https://github.com/golang/go/wiki/SliceTricks

\n

Let’s say we have a slice of length 10 :

\n
[1,2,3,4,5,6,7,8,9,10]
\n

We want to eliminate the element at index 8 (which is 9). The technique is to create two slices. The first slice will contain the elements from index 0 to index 7. The second slice will contain just one element: the one at index 9.

\n

We then merge the two slices.

\n
\n
Delete the element at index 8[fig:Delete-the-element-at-index]
\n
\n

Here is the code to do this with Go :

\n
a := []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}\na = append(a[:8], a[9:]...)
\n

First, we create a slice called a.

\n

Then use the built-in append to concatenate two slices :

\n
    \n
  • mySlice[:8] : which is mySlice reduced to elements at indexes 0 to 7.(remember that the index after the “:” is always excluded). This is B in the figure 5

  • \n
  • mySlice[9:] : which contains all elements of mySlice from index nine included. This is C in the figure 5

  • \n
\n

Then we concatenate the two slices to obtain our new slice that does not contain the element at index 8!

\n

Here is a generalization of the algorithm. If you have a slice s and you want to delete the element at index i i<len(s) then you can use the following :

\n
a = append(a[:i], a[i+1:]...)
\n
\n

23 Put an element at index Algorithm from : https://github.com/golang/go/wiki/SliceTricks

\n

We have a slice; we want to add an element to it but at a specific index. The idea is to use the copy builtin :

\n
// objective put "C" at index 2\n// index:            0    1    2    3    4\nletters := []string{"A", "B", "D", "E", "F"}\n\n// 1) add an element to the end of the slice\nletters = append(letters, "")\n\n// 2) copy letters[i:] to letters[i+1:]\ncopy(letters[3:], letters[2:])\n\n// 3) set "C" at index 2\nletters[2] = "C"
\n
\n
Put an element at a specific index
\n
\n

Let’s take another example : we have a slice of strings that contains names. The length is 4 :

\n
b := []string{"john", "jeanne", "jean", "josh"}
\n

We want to add the name joe at index 1. Our target slice is :

\n
["john","joe","jeanne","jean","josh"]
\n

We will first add an element to our slice to increase its length (from 4 to 5). We use the append builtin that will put it at the end of the slice :

\n
b = append(b, "")
\n

Now we have the next slice :

\n
["john", "jeanne", "jean", "josh",""]
\n

The length is 5. The idea then is to transform this slice into :

\n
["john", "", "joe","jeanne", "jean", "josh"]
\n

and then we set the element at index 1 with the desired value.

\n

Let’s summarize we want to perform the following transformation : [\"john\", \"jeanne\", \"jean\", \"josh\",\"\"] into [\"john\", \"X\", \"jeanne\", \"jean\", \"josh\"] To do that, we can use copy:

\n
    \n
  • The destination slice is [\"jean\", \"josh\",\"\"] which is b[2:]

  • \n
  • and our source slice will be [\"jeanne\", \"jean\", \"josh\",\"\"] which is b[1:]

  • \n
\n\n
copy(b[2:], b[1:])
\n

We end up with the following slice :

\n
["john", "jeanne", "jeanne", "jean","josh"]
\n

Note that we have now two jeanne element. That’s because we performed a copy and the value of the element at index 1 is not affected, but the element at index two has been replaced by the element that was originally at index 1.

\n

We now just have to give to the element at index one the new value \"joe\".

\n
b[1] = "joe"
\n
\n

23.1 Generalization

\n

When s is a slice of integers :

\n
s = append(s, 0)\ncopy(s[i+1:], s[i:])\ns[i] = x
\n
\n\n

24 Remove all elements of a slice

\n
\n

24.1 a[:0]

\n

You can remove all elements of a given slice by using the slicing operator. The trick is to slice our slice. We will take 0 elements from it :

\n
a := []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}\na = a[:0]\nfmt.Println(a)\n// []\nfmt.Println(len(a))\n// 0\nfmt.Println(cap(a))\n// 10
\n

With the slicing operator [:0] we have removed all elements of the slice.

\n

Therefore the length is now equal to 0. But the capacity (which is the size of the underlying array) is still 10.

\n

This means that the underlying array still exists and has a length of 10.

\n
\n

24.2 Set the slice to nil

\n

You can set the value of your slice to nil. By doing so, we are removing the data in memory.

\n
b := []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}\nb = nil\nfmt.Println(b)\n// []\nfmt.Println(len(b))\n// 0\nfmt.Println(cap(b))\n// 0
\n

Note that the capacity is now equal to zero, which means that the memory holding the underlying array has been freed and will be garbage collected by the internal go script.

\n
\n

25 Prepend an element to a slice

\n

We can use the append built-in to append an entry to a slice.

\n

But to prepend, it seems that we have no built-in at our disposal. But you can use the built-in append to prepend :

\n
b := []int{2, 3, 4}\nb = append([]int{1}, b...)
\n

We are building a new slice with the element that we want to prepend, and then we add all the elements of the original slice.

\n
\n

26 Multidimensional slices

\n

Multi-dimensional slices allow you to create a complex data structure that is easy to manipulate.

\n
\n

26.1 Creation of two-dimensional slices

\n

Sometimes your date does not fit entirely on one dimension. Imagine that you work for a supermarket. You want to study the baskets of the clients. You may want to analyze the price distributions inside baskets. You have a detailed price list for each basket. For instance :

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Price list example
basket #prices
11.23;1;12.40;3;20
240;2.45;23
....…
10005
\n

We can use a two dimensional slice to store it. The type will be[][]float64. It’s a slice that will contain slices of floats values :

\n
// slices/multidimensional/main.go\npackage main\n\nimport "fmt"\n\nfunc main() {\n    innerSlice1 := []float64{2.30, 4.01, 6.99, 8}\n    innerSlice2 := []float64{1, 10.20, 30, 1.34, 23}\n    my2DSlice := [][]float64{innerSlice1, innerSlice2}\n    fmt.Println(my2DSlice)\n}
\n

We first define two slices of float64 (innerSlice1 and innerSlice2). And then we create our two-dimensional slice (named my2DSlice) that will contains innerSlice1 and innerSlice2.

\n

The following snippet is a lighter version of the previous script :

\n
// slices/2d-dimension/main.go\npackage main\n\nimport "fmt"\n\nfunc main() {\n    my2DSlice := [][]float64{[]float64{2.30, 4.01, 6.99, 8}, []float64{1, 10.20, 30, 1.34, 23}}\n    fmt.Println(my2DSlice)\n}
\n

We directly put the two inner slices into the main one (without using two additional variables).

\n
\n

26.2 Creation of two-dimensional slices dynamically

\n

You can use the built-in append to construct your 2-D slice dynamically:

\n
myOther2DSlice := [][]int{}\nfor i := 0; i < 10; i++ {\n    myOther2DSlice = append(myOther2DSlice, []int{i})\n}\nfmt.Println(myOther2DSlice)\n//[[0] [1] [2] [3] [4] [5] [6] [7] [8] [9]]
\n

We first define our 2-D slice myOther2DSlice. The inner slices are slices of integers.

\n

Then we create a for-loop. We will iterate from 0 to 9. Each time we will append a new slice to myOther2DSlice. This slice will contain just one number: the current value of i.

\n

At the end of the execution, we will get a slice composed of 10 inner slices. Each of those inner slices contains one single integer.

\n
\n

26.3 More than two dimensions?

\n

Handling dimensions that are higher than two is not complicated.

\n

A 3-D slice will be defined using [][][]T where T is the type of elements inside the slices.

\n

Here is an example :

\n
store12 := [][]float64{[]float64{2.30, 4.01, 6.99, 8}, []float64{1, 10.20, 30, 1.34, 23}}\nstore34 := [][]float64{[]float64{1, 1.25}, []float64{2.45}, []float64{1.99, 2.45}}\nmy3DSlice := [][][]float64{store12,store34}\nfmt.Println(my3DSlice)\n//[[[2.3 4.01 6.99 8] [1 10.2 30 1.34 23]] [[1 1.25] [2.45] [1.99 2.45]]]
\n

To create slices that have a larger dimension, just add an additional [] to the type definition :

\n
// 4-D\nfourDimensions := [][][][]int\n\n// 5-D\nfiveDimensions := [][][][][]int
\n
\n

26.3.1 Dimensions increase while readability decreases.

\n

Note that when you increase your slices’ dimension, you also increase the time needed by the others to understand your algorithm.

\n

The human brain is not used to spaces with more than three dimensions.…

\n

In my opinion, we should avoid 3+ dimensions.

\n
\n

26.3.2 Use another data structure?

\n

In the previous example, we can maybe use another data structure... Take a look at the map chapter and then come back to this example to see how you can improve the code’s readability.

\n
\n

27 Test Yourself

\n

Questions

\n
    \n
  1. Fill in the blanks : “A slice is a ______ to an underlying _____”.

  2. \n
  3. How to find the index of an element in a slice?

  4. \n
  5. Internally, what is behind a slice?

  6. \n
  7. What is the capacity of names in the following example : names := []string{\"John\", \"Bob\", \"Claire\", \"Nik\"}. Explain why.

  8. \n
  9. What is the capacity of s2 in the following example : s2 := names[0:2]. Explain why.

  10. \n
  11. What happens internally when you append an element to a slice with a capacity equals to its length?

  12. \n
\n

Answers

\n
    \n
  1. Fill in the blanks : “A slice is a ______ to an underlying _____”.

    \n
      \n
    1. A slice is a pointer to an underlying array.
    2. \n
  2. \n
  3. How to find the index of an element in a slice?

    \n
      \n
    1. you can use a for loop with a range statement : for index, value := range s
    2. \n
  4. \n
  5. Internally, what is behind a slice?

    \n
      \n
    1. A struct composed of three fields :

      \n
        \n
      1. A pointer to an underlying array

      2. \n
      3. The length (a uint)

      4. \n
      5. The capacity (a uint)

      6. \n
    2. \n
  6. \n
  7. What is the capacity of names in the following example : names := []string{\"John\", \"Bob\", \"Claire\", \"Nik\"}. Explain why.

    \n
      \n
    1. Capacity is equal to 4. When the slice names is created, Go will allocate an underlying array of length and capacity equal to 4.
    2. \n
  8. \n
  9. What is the capacity of s2 in the following example : s2 := names[0:2]. Explain why.

    \n
      \n
    1. s2 is created by slicing an existing slice (names).

    2. \n
    3. We take slice from index 0 to index 1 (2-1).

    4. \n
    5. This slice’s length will be 2 (there are two elements in the slice).

    6. \n
    7. The capacity is equal to “the number of elements for which there is space allocated in the underlying array”.

    8. \n
    9. There are two more elements allocated in the underlying array. The capacity is equal to 4.

    10. \n
  10. \n
  11. What happens internally when you append an element to a slice with a capacity equals to its length?

    \n
      \n
    1. When the slice has its capacity equals to its length, it means that there is no space left on the underlying array

    2. \n
    3. When you append an element to the slice, the runtime will create a new array (its length will be twice the previous one).

    4. \n
    5. All data from the first array will be copied to the second array.

    6. \n
  12. \n
\n
\n\n

28 Key Takeaways

\n
    \n
  • A slice is a growable collection of elements of the same type

  • \n
  • A slice is a pointer to an underlying array

  • \n
  • Length: number of elements of the slice

  • \n
  • Capacity: number of elements for which there is space allocated in the underlying array

  • \n
  • To create an empty slice with a given length and capacity, you can use the builtin make

    \n

    s := make([]int,0,10) create a slice of integers, with a length of 0 and a capacity of 10

  • \n
  • To add elements to a slice, use the append builtin

    \n
    s = append(s,2020,2021)
  • \n
  • To find an element in a slice, you will need to iterate through the slice

    \n
      \n
    • If you need to do so, maybe you can use a map instead.
    • \n
  • \n
\n\n \n \n

Bibliography

\n \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t

Previous

\n\t\t\t\t\t\t\t\t\t

Arrays

\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t

Next

\n\t\t\t\t\t\t\t\t\t

Maps

\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tTable of contents\n\t\t\t\t\t\t\n\t\t\t\t\t\n \t\t\t\n\t\t\t\t\t\n\t\t\t\t\t
\n
\n\t\t\t\t\n
\n
\n
\n\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!./Chap21Slices.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!./Chap21Slices.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Chap21Slices.vue?vue&type=template&id=28373be2&scoped=true&\"\nimport script from \"./Chap21Slices.vue?vue&type=script&lang=js&\"\nexport * from \"./Chap21Slices.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 \"28373be2\",\n null\n \n)\n\nexport default component.exports","module.exports = __webpack_public_path__ + \"img/slice_internal_when_slicing.0fff636d.png\";","module.exports = __webpack_public_path__ + \"img/slice_put_one_elem_to_slice.8f803aeb.png\";","module.exports = __webpack_public_path__ + \"img/slice_indexing.c27b6758.png\";","module.exports = __webpack_public_path__ + \"img/append.96e05fd1.png\";","module.exports = __webpack_public_path__ + \"img/slices_copy.2eb74fde.png\";"],"sourceRoot":""}