{"id":144,"date":"2026-04-02T09:00:00","date_gmt":"2026-04-02T03:30:00","guid":{"rendered":"https:\/\/smitabharat.com\/blog\/?p=144"},"modified":"2026-10-10T21:20:37","modified_gmt":"2026-10-10T15:50:37","slug":"go-slices-arrays-explained","status":"publish","type":"post","link":"https:\/\/smitabharat.com\/blog\/go-slices-arrays-explained\/","title":{"rendered":"Go Slices and Arrays Explained Simply"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Go slices are the most common way to store a list of values, like items in a cart. In this post, you will learn how slices and arrays work and how to grow them. You will also learn to avoid their classic traps. Each idea comes with a short example that you can run yourself.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You already looped over a slice with range in the lesson on <a href=\"https:\/\/smitabharat.com\/blog\/go-for-loops-examples\/\">loops in Go with range, break and continue<\/a>. You also passed one into a function in <a href=\"https:\/\/smitabharat.com\/blog\/go-functions-beginners-guide\/\">writing and calling functions in Go<\/a>. Now it is time to see what a slice really is.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Arrays: The Fixed-Size List<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>var scores &#91;3]int\nscores&#91;0] = 90\nfmt.Println(scores, len(scores)) \/\/ &#91;90 0 0] 3\n\ndays := &#91;3]string{\"Mon\", \"Tue\", \"Wed\"}\nfmt.Println(days) \/\/ &#91;Mon Tue Wed]<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">An array holds a fixed number of values of one type. The size is part of its type, so <code>[3]int<\/code> can never grow to four items. Empty spots get the zero value, which is why you see <code>0 0<\/code> above.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Think of an egg tray with exactly six holes. It is handy, but you cannot add a seventh egg. Because of this limit, you will rarely use arrays directly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What Are Go Slices?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A slice is a flexible view of an array that can grow as you add items. So it works like a shopping bag rather than an egg tray. In real projects, Go slices are what you will use almost every time.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Creating Go Slices<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>cart := &#91;]string{\"milk\", \"bread\"}\n\nnums := make(&#91;]int, 3, 5)\nfmt.Println(nums, len(nums), cap(nums)) \/\/ &#91;0 0 0] 3 5\n\nvar empty &#91;]int\nfmt.Println(empty == nil, len(empty)) \/\/ true 0<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Notice the empty brackets in <code>[]string<\/code>. No size means it is a slice, not an array. The <code>make<\/code> function creates a slice with a starting length and room to grow. Also, a slice you never fill is <code>nil<\/code>, which simply means empty.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Adding Items with append<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>cart = append(cart, \"eggs\", \"rice\")\nfmt.Println(cart, len(cart)) \/\/ &#91;milk bread eggs rice] 4<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>append<\/code> function adds items to the end and returns the new slice. That is why you must save the result back into <code>cart<\/code>. Even a nil slice works with append, so you can start empty and grow.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Length and Capacity of Go Slices<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>nums := make(&#91;]int, 3, 5)\nnums = append(nums, 7)\nfmt.Println(nums, len(nums), cap(nums)) \/\/ &#91;0 0 0 7] 4 5<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Length, from <code>len<\/code>, is how many items the slice holds right now. Capacity, from <code>cap<\/code>, is how much room the hidden array has. When length reaches capacity, append quietly creates a bigger array and copies everything over.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How Go Slices Work Inside<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Every slice is a small header with three parts: a pointer to an array, a length and a capacity. A pointer is just the address of where the data lives. As a result, two slices can point at the same array.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Slicing a Slice<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>letters := &#91;]string{\"a\", \"b\", \"c\", \"d\", \"e\"}\npart := letters&#91;1:4]\nfmt.Println(part, len(part), cap(part)) \/\/ &#91;b c d] 3 4\n\npart&#91;0] = \"X\"\nfmt.Println(letters) \/\/ &#91;a X c d e]<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The expression <code>letters[1:4]<\/code> takes items from index 1 up to, but not including, index 4. However, it does not copy anything. So changing <code>part[0]<\/code> also changes <code>letters[1]<\/code>, as the diagram shows.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-slices-arrays-explained-diagram-1024x640.png\" alt=\"Go Slices diagram showing two slice headers sharing one underlying array\" class=\"wp-image-146\" srcset=\"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-slices-arrays-explained-diagram-1024x640.png 1024w, https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-slices-arrays-explained-diagram-300x188.png 300w, https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-slices-arrays-explained-diagram-768x480.png 768w, https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-slices-arrays-explained-diagram.png 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Both slices share one array, so a change through part is visible in letters.<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Making a Safe Copy<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>src := &#91;]int{1, 2, 3}\ndst := make(&#91;]int, len(src))\ncopy(dst, src)\ndst&#91;0] = 100\nfmt.Println(src, dst) \/\/ &#91;1 2 3] &#91;100 2 3]<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">When you need an independent list, use <code>copy<\/code>. It fills a new slice with the values, so later changes stay separate.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Looping Over Go Slices<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>for i, item := range cart {\n\tfmt.Println(i, item)\n}\n\/\/ 0 milk\n\/\/ 1 bread\n\/\/ 2 eggs\n\/\/ 3 rice<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Range gives you the index and the value for each item. If you only need the value, replace <code>i<\/code> with an underscore.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common Mistakes with Go Slices<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Error you see<\/th><th>Why it happens<\/th><th>How to fix it<\/th><\/tr><\/thead><tbody><tr><td>append(c, &#8220;b&#8221;) (value of type []string) is not used<\/td><td>The result of append was thrown away.<\/td><td>Write c = append(c, &#8220;b&#8221;).<\/td><\/tr><tr><td>panic: runtime error: index out of range [0] with length 0<\/td><td>The code read an item from an empty slice.<\/td><td>Check len(s) first.<\/td><\/tr><tr><td>Data changes by surprise<\/td><td>Two slices share one array.<\/td><td>Use copy for a separate list.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The shared array trap catches even experienced developers. For that reason, interviewers love it, and you will find similar questions in my <a href=\"https:\/\/smitabharat.com\/blog\/go-lang-interview-questions-and-answers\/\">Go interview questions and answers<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Official Resources<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">These pages come straight from the Go team, so they are always accurate and up to date.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/go.dev\/tour\/moretypes\/7\">A Tour of Go: Slices<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/go.dev\/blog\/slices-intro\">Go blog: Go Slices, usage and internals<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/go.dev\/ref\/spec#Slice_types\">Go spec: Slice types<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Quick Recap<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Arrays have a fixed size, such as [3]int.<\/li>\n\n\n\n<li>Go slices grow with append, and you must save the result.<\/li>\n\n\n\n<li>Length is how many items exist, and capacity is the room left in the array.<\/li>\n\n\n\n<li>Slicing with s[1:4] shares the same array, so changes show in both.<\/li>\n\n\n\n<li>Use copy when you need a fully separate list.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">What&#8217;s Next?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Slices store items by position. Next, we will store values by name using maps, which work like a phone book.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Coming soon: Go Maps Explained with Simple Examples<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Go slices are the most common way to store a list of values, like items in a cart. In this post, you will learn&hellip;<\/p>\n","protected":false},"author":1,"featured_media":194,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_swapz_level":"","_swapz_series_part":0,"_swapz_hide_toc":false,"_swapz_hide_featured":false,"_swapz_description":"","footnotes":""},"categories":[15],"tags":[11,29,23,21],"swapz_series":[],"class_list":["post-144","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-go-lang","tag-go-lang","tag-go-slices","tag-go-tutorial","tag-golang-basics"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Go Slices and Arrays Explained with Examples<\/title>\n<meta name=\"description\" content=\"Learn Go slices and arrays with simple examples: make, append, length, capacity, slicing, copy and the shared array trap beginners hit.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/smitabharat.com\/blog\/go-slices-arrays-explained\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Go Slices and Arrays Explained with Examples\" \/>\n<meta property=\"og:description\" content=\"Learn Go slices and arrays with simple examples: make, append, length, capacity, slicing, copy and the shared array trap beginners hit.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/smitabharat.com\/blog\/go-slices-arrays-explained\/\" \/>\n<meta property=\"og:site_name\" content=\"Smita Bharat - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-04-02T03:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-10T15:50:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-slices-arrays-explained-featured-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Smita\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Smita\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-slices-arrays-explained\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-slices-arrays-explained\\\/\"},\"author\":{\"name\":\"Smita\",\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/#\\\/schema\\\/person\\\/27a1b1067d396703215c54acedbfd339\"},\"headline\":\"Go Slices and Arrays Explained Simply\",\"datePublished\":\"2026-04-02T03:30:00+00:00\",\"dateModified\":\"2026-10-10T15:50:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-slices-arrays-explained\\\/\"},\"wordCount\":706,\"publisher\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/#\\\/schema\\\/person\\\/27a1b1067d396703215c54acedbfd339\"},\"image\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-slices-arrays-explained\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/go-slices-arrays-explained-featured-1.png\",\"keywords\":[\"Go Lang\",\"Go Slices\",\"Go Tutorial\",\"Golang Basics\"],\"articleSection\":[\"Go Lang\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-slices-arrays-explained\\\/\",\"url\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-slices-arrays-explained\\\/\",\"name\":\"Go Slices and Arrays Explained with Examples\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-slices-arrays-explained\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-slices-arrays-explained\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/go-slices-arrays-explained-featured-1.png\",\"datePublished\":\"2026-04-02T03:30:00+00:00\",\"dateModified\":\"2026-10-10T15:50:37+00:00\",\"description\":\"Learn Go slices and arrays with simple examples: make, append, length, capacity, slicing, copy and the shared array trap beginners hit.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-slices-arrays-explained\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-slices-arrays-explained\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-slices-arrays-explained\\\/#primaryimage\",\"url\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/go-slices-arrays-explained-featured-1.png\",\"contentUrl\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/go-slices-arrays-explained-featured-1.png\",\"width\":1200,\"height\":630,\"caption\":\"Go Slices featured image: cards comparing an array, a slice and slicing\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-slices-arrays-explained\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Go Slices and Arrays Explained Simply\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/\",\"name\":\"Smita Bharat Blog\",\"description\":\"Golang &amp; Backend Development Tutorials and Interview Questions\",\"publisher\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/#\\\/schema\\\/person\\\/27a1b1067d396703215c54acedbfd339\"},\"alternateName\":\"Smita Bharat\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/#\\\/schema\\\/person\\\/27a1b1067d396703215c54acedbfd339\",\"name\":\"Smita\",\"logo\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/#\\\/schema\\\/person\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/smitabharat.com\\\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Go Slices and Arrays Explained with Examples","description":"Learn Go slices and arrays with simple examples: make, append, length, capacity, slicing, copy and the shared array trap beginners hit.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/smitabharat.com\/blog\/go-slices-arrays-explained\/","og_locale":"en_US","og_type":"article","og_title":"Go Slices and Arrays Explained with Examples","og_description":"Learn Go slices and arrays with simple examples: make, append, length, capacity, slicing, copy and the shared array trap beginners hit.","og_url":"https:\/\/smitabharat.com\/blog\/go-slices-arrays-explained\/","og_site_name":"Smita Bharat - Blog","article_published_time":"2026-04-02T03:30:00+00:00","article_modified_time":"2026-10-10T15:50:37+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-slices-arrays-explained-featured-1.png","type":"image\/png"}],"author":"Smita","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Smita","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/smitabharat.com\/blog\/go-slices-arrays-explained\/#article","isPartOf":{"@id":"https:\/\/smitabharat.com\/blog\/go-slices-arrays-explained\/"},"author":{"name":"Smita","@id":"https:\/\/smitabharat.com\/blog\/#\/schema\/person\/27a1b1067d396703215c54acedbfd339"},"headline":"Go Slices and Arrays Explained Simply","datePublished":"2026-04-02T03:30:00+00:00","dateModified":"2026-10-10T15:50:37+00:00","mainEntityOfPage":{"@id":"https:\/\/smitabharat.com\/blog\/go-slices-arrays-explained\/"},"wordCount":706,"publisher":{"@id":"https:\/\/smitabharat.com\/blog\/#\/schema\/person\/27a1b1067d396703215c54acedbfd339"},"image":{"@id":"https:\/\/smitabharat.com\/blog\/go-slices-arrays-explained\/#primaryimage"},"thumbnailUrl":"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-slices-arrays-explained-featured-1.png","keywords":["Go Lang","Go Slices","Go Tutorial","Golang Basics"],"articleSection":["Go Lang"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/smitabharat.com\/blog\/go-slices-arrays-explained\/","url":"https:\/\/smitabharat.com\/blog\/go-slices-arrays-explained\/","name":"Go Slices and Arrays Explained with Examples","isPartOf":{"@id":"https:\/\/smitabharat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/smitabharat.com\/blog\/go-slices-arrays-explained\/#primaryimage"},"image":{"@id":"https:\/\/smitabharat.com\/blog\/go-slices-arrays-explained\/#primaryimage"},"thumbnailUrl":"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-slices-arrays-explained-featured-1.png","datePublished":"2026-04-02T03:30:00+00:00","dateModified":"2026-10-10T15:50:37+00:00","description":"Learn Go slices and arrays with simple examples: make, append, length, capacity, slicing, copy and the shared array trap beginners hit.","breadcrumb":{"@id":"https:\/\/smitabharat.com\/blog\/go-slices-arrays-explained\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/smitabharat.com\/blog\/go-slices-arrays-explained\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/smitabharat.com\/blog\/go-slices-arrays-explained\/#primaryimage","url":"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-slices-arrays-explained-featured-1.png","contentUrl":"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-slices-arrays-explained-featured-1.png","width":1200,"height":630,"caption":"Go Slices featured image: cards comparing an array, a slice and slicing"},{"@type":"BreadcrumbList","@id":"https:\/\/smitabharat.com\/blog\/go-slices-arrays-explained\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/smitabharat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Go Slices and Arrays Explained Simply"}]},{"@type":"WebSite","@id":"https:\/\/smitabharat.com\/blog\/#website","url":"https:\/\/smitabharat.com\/blog\/","name":"Smita Bharat Blog","description":"Golang &amp; Backend Development Tutorials and Interview Questions","publisher":{"@id":"https:\/\/smitabharat.com\/blog\/#\/schema\/person\/27a1b1067d396703215c54acedbfd339"},"alternateName":"Smita Bharat","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/smitabharat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/smitabharat.com\/blog\/#\/schema\/person\/27a1b1067d396703215c54acedbfd339","name":"Smita","logo":{"@id":"https:\/\/smitabharat.com\/blog\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/smitabharat.com\/blog"]}]}},"_links":{"self":[{"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/posts\/144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/comments?post=144"}],"version-history":[{"count":1,"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/posts\/144\/revisions"}],"predecessor-version":[{"id":147,"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/posts\/144\/revisions\/147"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/media\/194"}],"wp:attachment":[{"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/media?parent=144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/categories?post=144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/tags?post=144"},{"taxonomy":"swapz_series","embeddable":true,"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/swapz_series?post=144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}