{"id":204,"date":"2026-04-12T09:00:00","date_gmt":"2026-04-12T03:30:00","guid":{"rendered":"https:\/\/smitabharat.com\/blog\/?p=204"},"modified":"2026-10-10T21:20:45","modified_gmt":"2026-10-10T15:50:45","slug":"go-context-beginners-guide","status":"publish","type":"post","link":"https:\/\/smitabharat.com\/blog\/go-context-beginners-guide\/","title":{"rendered":"Go Context Explained for Beginners"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Go context lets you cancel slow work, set deadlines and pass request details through your program. In this post, you will learn how to create one, stop goroutines with it and avoid the usual mistakes. Each idea comes with a short example that you can run yourself.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It works hand in hand with goroutines and channels. So if those feel new, first read <a href=\"https:\/\/smitabharat.com\/blog\/go-goroutines-beginners-guide\/\">goroutines in Go for beginners<\/a> and <a href=\"https:\/\/smitabharat.com\/blog\/go-channels-examples\/\">channels in Go with examples<\/a>. We will also use <code>select<\/code>, which you met in the channels lesson.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What Is Go Context?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">It is a small value from the standard <code>context<\/code> package. It carries three things: a cancel signal, an optional deadline and a few request-scoped values. You pass it as the first argument to any function that might take a while.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Think of ordering food in an app. If you cancel the order, the restaurant and the delivery rider must both stop. Similarly, Go context sends one stop signal to every goroutine working on the same request.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why Go Context Matters<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Imagine a web request that calls a database and two other services. Then the user closes the browser tab. Without one, all that work keeps running and wastes memory. With a context, every step notices the cancel and stops early. This also protects your server under heavy load, because cancelled requests free their memory quickly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Creating a Go Context<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">context.Background<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Every tree of these values starts from a root. Usually that root is <code>context.Background()<\/code>, which never cancels on its own. Then you wrap it to add a cancel signal or a deadline.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">WithCancel: Stop Work on Demand<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>ctx, cancel := context.WithCancel(context.Background())\n\ngo func() {\n\ttime.Sleep(50 * time.Millisecond)\n\tcancel()\n}()\n\n&lt;-ctx.Done()\nfmt.Println(\"cancelled:\", ctx.Err()) \/\/ cancelled: context canceled<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The function returns a new ctx and a <code>cancel<\/code> function. When you call <code>cancel()<\/code>, the <code>Done()<\/code> channel closes. As a result, anything waiting on it wakes up at once. For example, a search box can cancel the old search when the user types a new letter.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">WithTimeout: Stop Slow Work<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>func slowTask(ctx context.Context) error {\n\tselect {\n\tcase &lt;-time.After(2 * time.Second):\n\t\tfmt.Println(\"task finished\")\n\t\treturn nil\n\tcase &lt;-ctx.Done():\n\t\treturn ctx.Err()\n\t}\n}\n\nctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond)\ndefer cancel()\n\nerr := slowTask(ctx)\nfmt.Println(\"error:\", err) \/\/ error: context deadline exceeded\nfmt.Println(errors.Is(err, context.DeadlineExceeded)) \/\/ true<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The task needs two seconds, but ctx allows only 100 milliseconds. So the <code>ctx.Done()<\/code> case wins the select, and the task stops early. The diagram below shows this race.<\/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-context-beginners-guide-diagram-1024x640.png\" alt=\"Go Context diagram showing a two second task stopped early by a 100 ms timeout\" class=\"wp-image-206\" srcset=\"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-context-beginners-guide-diagram-1024x640.png 1024w, https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-context-beginners-guide-diagram-300x188.png 300w, https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-context-beginners-guide-diagram-768x480.png 768w, https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-context-beginners-guide-diagram-1536x960.png 1536w, https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-context-beginners-guide-diagram-2048x1280.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><em>The timeout fires at 100 ms, Done() closes, and slowTask returns before its 2 second job ends.<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Listening for ctx.Done()<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Cancelling does not stop your code by magic. Instead, your function must check <code>ctx.Done()<\/code>, usually inside a select or a loop. Most standard library functions that do network work, such as <code>http.NewRequestWithContext<\/code>, already check it for you.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In a web server, every request already carries a Go context. You get it with <code>r.Context()<\/code>, and it cancels on its own when the client disconnects. So pass it down to database calls and other services. That way, a closed browser tab stops all the work behind it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Passing Values with WithValue<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>type ctxKey string\n\nctx := context.WithValue(context.Background(), ctxKey(\"requestID\"), \"abc-123\")\nfmt.Println(ctx.Value(ctxKey(\"requestID\"))) \/\/ abc-123<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In short, use <code>WithValue<\/code> only for small request details, like a request ID or a user ID. Also, define your own key type, because plain strings can clash with keys from other packages.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Go Context Best Practices<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Pass it as the first parameter, named <code>ctx<\/code>.<\/li>\n\n\n\n<li>Always call <code>defer cancel()<\/code> right after creating one.<\/li>\n\n\n\n<li>Never store ctx inside a struct field.<\/li>\n\n\n\n<li>Never pass <code>nil<\/code>, so use <code>context.TODO()<\/code> if you are unsure.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Common Mistakes with Go Context<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Problem you see<\/th><th>Why it happens<\/th><th>How to fix it<\/th><\/tr><\/thead><tbody><tr><td>go vet: the cancel function returned by context.WithTimeout should be called, not discarded<\/td><td>The code threw cancel away with _.<\/td><td>Keep it and add defer cancel().<\/td><\/tr><tr><td>Work keeps running after timeout<\/td><td>The function never checks ctx.Done().<\/td><td>Select on ctx.Done().<\/td><\/tr><tr><td>Value returns nil<\/td><td>The key type does not match.<\/td><td>Use the same custom key type.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Forgetting <code>cancel<\/code> leaks resources until the timeout ends. These questions are popular in backend interviews, so practise with 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:\/\/pkg.go.dev\/context\">context package documentation<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/go.dev\/blog\/context\">Go blog: Go Concurrency Patterns: Context<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/go.dev\/blog\/context-and-structs\">Go blog: Contexts and structs<\/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>Go context carries cancel signals, deadlines and small request values.<\/li>\n\n\n\n<li>Start from context.Background() and wrap it.<\/li>\n\n\n\n<li>WithCancel stops work on demand, and WithTimeout stops slow work.<\/li>\n\n\n\n<li>Your code must listen on ctx.Done() to stop early.<\/li>\n\n\n\n<li>Always defer cancel() and pass ctx as the first parameter.<\/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\">You have finished the core concurrency tools. Next, we will write one function that works for many types using generics.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Coming soon: Go Generics Explained with Examples<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Go context lets you cancel slow work, set deadlines and pass request details through your program. In this post, you will learn how to&hellip;<\/p>\n","protected":false},"author":1,"featured_media":205,"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":[39,11,23,21],"swapz_series":[],"class_list":["post-204","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-go-lang","tag-go-context","tag-go-lang","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 Context Explained for Beginners with Examples<\/title>\n<meta name=\"description\" content=\"Learn Go context with simple examples: WithCancel, WithTimeout, ctx.Done(), WithValue and the mistakes that leak goroutines.\" \/>\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-context-beginners-guide\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Go Context Explained for Beginners with Examples\" \/>\n<meta property=\"og:description\" content=\"Learn Go context with simple examples: WithCancel, WithTimeout, ctx.Done(), WithValue and the mistakes that leak goroutines.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/smitabharat.com\/blog\/go-context-beginners-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"Smita Bharat - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-04-12T03:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-10T15:50:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-context-beginners-guide-featured.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2400\" \/>\n\t<meta property=\"og:image:height\" content=\"1260\" \/>\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-context-beginners-guide\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-context-beginners-guide\\\/\"},\"author\":{\"name\":\"Smita\",\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/#\\\/schema\\\/person\\\/27a1b1067d396703215c54acedbfd339\"},\"headline\":\"Go Context Explained for Beginners\",\"datePublished\":\"2026-04-12T03:30:00+00:00\",\"dateModified\":\"2026-10-10T15:50:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-context-beginners-guide\\\/\"},\"wordCount\":719,\"publisher\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/#\\\/schema\\\/person\\\/27a1b1067d396703215c54acedbfd339\"},\"image\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-context-beginners-guide\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/go-context-beginners-guide-featured.png\",\"keywords\":[\"Go Context\",\"Go Lang\",\"Go Tutorial\",\"Golang Basics\"],\"articleSection\":[\"Go Lang\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-context-beginners-guide\\\/\",\"url\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-context-beginners-guide\\\/\",\"name\":\"Go Context Explained for Beginners with Examples\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-context-beginners-guide\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-context-beginners-guide\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/go-context-beginners-guide-featured.png\",\"datePublished\":\"2026-04-12T03:30:00+00:00\",\"dateModified\":\"2026-10-10T15:50:45+00:00\",\"description\":\"Learn Go context with simple examples: WithCancel, WithTimeout, ctx.Done(), WithValue and the mistakes that leak goroutines.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-context-beginners-guide\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-context-beginners-guide\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-context-beginners-guide\\\/#primaryimage\",\"url\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/go-context-beginners-guide-featured.png\",\"contentUrl\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/go-context-beginners-guide-featured.png\",\"width\":2400,\"height\":1260,\"caption\":\"Go Context featured image: cards showing WithCancel, WithTimeout and ctx.Done\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-context-beginners-guide\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Go Context Explained for Beginners\"}]},{\"@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 Context Explained for Beginners with Examples","description":"Learn Go context with simple examples: WithCancel, WithTimeout, ctx.Done(), WithValue and the mistakes that leak goroutines.","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-context-beginners-guide\/","og_locale":"en_US","og_type":"article","og_title":"Go Context Explained for Beginners with Examples","og_description":"Learn Go context with simple examples: WithCancel, WithTimeout, ctx.Done(), WithValue and the mistakes that leak goroutines.","og_url":"https:\/\/smitabharat.com\/blog\/go-context-beginners-guide\/","og_site_name":"Smita Bharat - Blog","article_published_time":"2026-04-12T03:30:00+00:00","article_modified_time":"2026-10-10T15:50:45+00:00","og_image":[{"width":2400,"height":1260,"url":"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-context-beginners-guide-featured.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-context-beginners-guide\/#article","isPartOf":{"@id":"https:\/\/smitabharat.com\/blog\/go-context-beginners-guide\/"},"author":{"name":"Smita","@id":"https:\/\/smitabharat.com\/blog\/#\/schema\/person\/27a1b1067d396703215c54acedbfd339"},"headline":"Go Context Explained for Beginners","datePublished":"2026-04-12T03:30:00+00:00","dateModified":"2026-10-10T15:50:45+00:00","mainEntityOfPage":{"@id":"https:\/\/smitabharat.com\/blog\/go-context-beginners-guide\/"},"wordCount":719,"publisher":{"@id":"https:\/\/smitabharat.com\/blog\/#\/schema\/person\/27a1b1067d396703215c54acedbfd339"},"image":{"@id":"https:\/\/smitabharat.com\/blog\/go-context-beginners-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-context-beginners-guide-featured.png","keywords":["Go Context","Go Lang","Go Tutorial","Golang Basics"],"articleSection":["Go Lang"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/smitabharat.com\/blog\/go-context-beginners-guide\/","url":"https:\/\/smitabharat.com\/blog\/go-context-beginners-guide\/","name":"Go Context Explained for Beginners with Examples","isPartOf":{"@id":"https:\/\/smitabharat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/smitabharat.com\/blog\/go-context-beginners-guide\/#primaryimage"},"image":{"@id":"https:\/\/smitabharat.com\/blog\/go-context-beginners-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-context-beginners-guide-featured.png","datePublished":"2026-04-12T03:30:00+00:00","dateModified":"2026-10-10T15:50:45+00:00","description":"Learn Go context with simple examples: WithCancel, WithTimeout, ctx.Done(), WithValue and the mistakes that leak goroutines.","breadcrumb":{"@id":"https:\/\/smitabharat.com\/blog\/go-context-beginners-guide\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/smitabharat.com\/blog\/go-context-beginners-guide\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/smitabharat.com\/blog\/go-context-beginners-guide\/#primaryimage","url":"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-context-beginners-guide-featured.png","contentUrl":"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-context-beginners-guide-featured.png","width":2400,"height":1260,"caption":"Go Context featured image: cards showing WithCancel, WithTimeout and ctx.Done"},{"@type":"BreadcrumbList","@id":"https:\/\/smitabharat.com\/blog\/go-context-beginners-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/smitabharat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Go Context Explained for Beginners"}]},{"@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\/204","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=204"}],"version-history":[{"count":2,"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/posts\/204\/revisions"}],"predecessor-version":[{"id":208,"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/posts\/204\/revisions\/208"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/media\/205"}],"wp:attachment":[{"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/media?parent=204"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/categories?post=204"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/tags?post=204"},{"taxonomy":"swapz_series","embeddable":true,"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/swapz_series?post=204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}