{"id":283,"date":"2026-04-22T09:00:00","date_gmt":"2026-04-22T03:30:00","guid":{"rendered":"https:\/\/smitabharat.com\/blog\/go-defer-panic-recover\/"},"modified":"2026-10-10T21:20:53","modified_gmt":"2026-10-10T15:50:53","slug":"go-defer-panic-recover","status":"publish","type":"post","link":"https:\/\/smitabharat.com\/blog\/go-defer-panic-recover\/","title":{"rendered":"Go Panic and Recover with Defer Explained"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Go panic and recover let a program deal with errors that are too serious for a normal return value. In this post, you will learn how <code>defer<\/code> schedules work, what a panic does and how <code>recover<\/code> stops a crash. Each idea comes with a short example that you can run yourself.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Still, you should handle most problems with error values. For a refresher, see <a href=\"https:\/\/smitabharat.com\/blog\/go-error-handling-guide\/\">error handling in Go for beginners<\/a>. You also used <code>defer<\/code> to close files in <a href=\"https:\/\/smitabharat.com\/blog\/go-file-handling-examples\/\">Go file handling with examples<\/a>. Now you will see how it really works.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Go Panic and Recover Start with defer<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><code>defer<\/code> delays a function call until the surrounding function returns. So it is perfect for clean-up work, such as closing files or unlocking a mutex. In fact, Go panic and recover both depend on it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>func order() {\n\tfor i := 1; i &lt;= 3; i++ {\n\t\tdefer fmt.Println(\"defer\", i)\n\t}\n\tfmt.Println(\"function body\")\n}\n\/\/ function body\n\/\/ defer 3\n\/\/ defer 2\n\/\/ defer 1<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Deferred calls run in reverse order, last in first out. Think of a stack of plates: you take the top plate first.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Arguments Are Evaluated Early<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>x := 1\ndefer fmt.Println(\"deferred x =\", x)\nx = 2\nfmt.Println(\"current x =\", x)\n\/\/ current x = 2\n\/\/ deferred x = 1<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Go evaluates the arguments when it reaches the <code>defer<\/code> line, not when the call runs. As a result, the deferred call still sees the old value.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What Is a Go Panic?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A panic stops the normal flow of a function. Go then runs every deferred call on the way up, and finally the program crashes with a message. For example, reading past the end of a slice causes a panic.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nums := []int{1, 2, 3}\ni := 5\nfmt.Println(nums[i])\n\/\/ panic: runtime error: index out of range [5] with length 3<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can also panic on purpose with <code>panic(\"message\")<\/code>. However, keep that for truly impossible situations, such as broken setup code at startup.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Go Panic and Recover Together<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><code>recover<\/code> catches a panic and lets the program continue. It only works inside a deferred function, because deferred calls are the only code that still runs during a panic. The diagram below shows the full journey.<\/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-defer-panic-recover-diagram-1024x640.png\" alt=\"Go Panic and Recover diagram showing a divide by zero panic caught by recover inside a deferred function\" class=\"wp-image-257\" srcset=\"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-defer-panic-recover-diagram-1024x640.png 1024w, https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-defer-panic-recover-diagram-300x188.png 300w, https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-defer-panic-recover-diagram-768x480.png 768w, https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-defer-panic-recover-diagram-1536x960.png 1536w, https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-defer-panic-recover-diagram-2048x1280.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><em>The panic travels up through the deferred calls, and recover inside a deferred function turns it back into a normal return.<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>func safeDivide(a, b int) (result int, err error) {\n\tdefer func() {\n\t\tif r := recover(); r != nil {\n\t\t\terr = fmt.Errorf(\"recovered: %v\", r)\n\t\t}\n\t}()\n\treturn a \/ b, nil\n}\n\nfmt.Println(safeDivide(10, 2)) \/\/ 5 &lt;nil&gt;\nfmt.Println(safeDivide(1, 0))  \/\/ 0 recovered: runtime error: integer divide by zero<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Here the deferred closure catches the divide by zero panic. Then it turns the panic into a normal error. This trick uses named results, so the deferred function can still set <code>err<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">recover Outside defer Does Nothing<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>fmt.Println(recover()) \/\/ &lt;nil&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If no panic is happening, <code>recover<\/code> simply returns <code>nil<\/code>. Also, calling it outside a deferred function never stops a panic.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">When to Use Go Panic and Recover<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Situation<\/th><th>Use<\/th><\/tr><\/thead><tbody><tr><td>File not found, bad user input<\/td><td>Return an error<\/td><\/tr><tr><td>Network call fails<\/td><td>Return an error<\/td><\/tr><tr><td>A bug that should never happen<\/td><td>panic<\/td><\/tr><tr><td>Library must not crash its caller<\/td><td>recover at the boundary, return an error<\/td><\/tr><tr><td>Web server handler panics<\/td><td>The net\/http server already recovers for you<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In short, errors are for expected problems, and panics are for bugs. Go panic and recover should stay rare in everyday code. In fact, the standard <code>net\/http<\/code> server recovers panics in each handler. So one bad request does not stop the whole <a href=\"https:\/\/smitabharat.com\/blog\/go-http-server-beginners\/\">Go HTTP server<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common Mistakes with Go Panic and Recover<\/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>Program still crashes<\/td><td>recover was not called inside a deferred function.<\/td><td>Call it inside <code>defer func() { ... }()<\/code>.<\/td><\/tr><tr><td>Panic in a goroutine kills the program<\/td><td>Each goroutine needs its own recover.<\/td><td>Add a deferred recover inside that goroutine.<\/td><\/tr><tr><td>Deferred value looks old<\/td><td>Arguments were evaluated at the defer line.<\/td><td>Use a closure to read the latest value.<\/td><\/tr><tr><td>Code panics for normal problems<\/td><td>Panic was used instead of an error.<\/td><td>Return an error value.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Defer order and recover rules are popular interview questions. So test yourself 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 stay accurate and up to date.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/go.dev\/blog\/defer-panic-and-recover\">Go blog: Defer, Panic, and Recover<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/go.dev\/ref\/spec#Handling_panics\">Go spec: Handling panics<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/go.dev\/doc\/effective_go#recover\">Effective Go: Recover<\/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><code>defer<\/code> runs a call when the function returns, in reverse order.<\/li>\n\n\n\n<li>Deferred arguments are evaluated at the defer line.<\/li>\n\n\n\n<li>A panic unwinds the stack and runs every deferred call.<\/li>\n\n\n\n<li>Go panic and recover work together only inside a deferred function.<\/li>\n\n\n\n<li>Use errors for expected problems and panic only for bugs.<\/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\">Your programs can now survive surprises. Next, we will look inside interface values with type assertions and type switches.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Next lesson: <a href=\"https:\/\/smitabharat.com\/blog\/go-type-assertion-type-switch\/\">Go Type Assertion and Type Switch Explained<\/a><\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>Go panic and recover let a program deal with errors that are too serious for a normal return value. In this post, you will&hellip;<\/p>\n","protected":false},"author":1,"featured_media":256,"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,49,23,21],"swapz_series":[],"class_list":["post-283","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-go-lang","tag-go-lang","tag-go-panic-and-recover","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 Panic and Recover with Defer Explained Simply<\/title>\n<meta name=\"description\" content=\"Learn Go panic and recover with simple examples: how defer works, what a panic does, recover inside defer and when to return errors.\" \/>\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-defer-panic-recover\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Go Panic and Recover with Defer Explained Simply\" \/>\n<meta property=\"og:description\" content=\"Learn Go panic and recover with simple examples: how defer works, what a panic does, recover inside defer and when to return errors.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/smitabharat.com\/blog\/go-defer-panic-recover\/\" \/>\n<meta property=\"og:site_name\" content=\"Smita Bharat - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-04-22T03:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-10T15:50:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-defer-panic-recover-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-defer-panic-recover\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-defer-panic-recover\\\/\"},\"author\":{\"name\":\"Smita\",\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/#\\\/schema\\\/person\\\/27a1b1067d396703215c54acedbfd339\"},\"headline\":\"Go Panic and Recover with Defer Explained\",\"datePublished\":\"2026-04-22T03:30:00+00:00\",\"dateModified\":\"2026-10-10T15:50:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-defer-panic-recover\\\/\"},\"wordCount\":685,\"publisher\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/#\\\/schema\\\/person\\\/27a1b1067d396703215c54acedbfd339\"},\"image\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-defer-panic-recover\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/go-defer-panic-recover-featured.png\",\"keywords\":[\"Go Lang\",\"Go Panic and Recover\",\"Go Tutorial\",\"Golang Basics\"],\"articleSection\":[\"Go Lang\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-defer-panic-recover\\\/\",\"url\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-defer-panic-recover\\\/\",\"name\":\"Go Panic and Recover with Defer Explained Simply\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-defer-panic-recover\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-defer-panic-recover\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/go-defer-panic-recover-featured.png\",\"datePublished\":\"2026-04-22T03:30:00+00:00\",\"dateModified\":\"2026-10-10T15:50:53+00:00\",\"description\":\"Learn Go panic and recover with simple examples: how defer works, what a panic does, recover inside defer and when to return errors.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-defer-panic-recover\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-defer-panic-recover\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-defer-panic-recover\\\/#primaryimage\",\"url\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/go-defer-panic-recover-featured.png\",\"contentUrl\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/go-defer-panic-recover-featured.png\",\"width\":2400,\"height\":1260,\"caption\":\"Go Panic and Recover featured image: cards for defer, panic and recover\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-defer-panic-recover\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Go Panic and Recover with Defer Explained\"}]},{\"@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 Panic and Recover with Defer Explained Simply","description":"Learn Go panic and recover with simple examples: how defer works, what a panic does, recover inside defer and when to return errors.","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-defer-panic-recover\/","og_locale":"en_US","og_type":"article","og_title":"Go Panic and Recover with Defer Explained Simply","og_description":"Learn Go panic and recover with simple examples: how defer works, what a panic does, recover inside defer and when to return errors.","og_url":"https:\/\/smitabharat.com\/blog\/go-defer-panic-recover\/","og_site_name":"Smita Bharat - Blog","article_published_time":"2026-04-22T03:30:00+00:00","article_modified_time":"2026-10-10T15:50:53+00:00","og_image":[{"width":2400,"height":1260,"url":"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-defer-panic-recover-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-defer-panic-recover\/#article","isPartOf":{"@id":"https:\/\/smitabharat.com\/blog\/go-defer-panic-recover\/"},"author":{"name":"Smita","@id":"https:\/\/smitabharat.com\/blog\/#\/schema\/person\/27a1b1067d396703215c54acedbfd339"},"headline":"Go Panic and Recover with Defer Explained","datePublished":"2026-04-22T03:30:00+00:00","dateModified":"2026-10-10T15:50:53+00:00","mainEntityOfPage":{"@id":"https:\/\/smitabharat.com\/blog\/go-defer-panic-recover\/"},"wordCount":685,"publisher":{"@id":"https:\/\/smitabharat.com\/blog\/#\/schema\/person\/27a1b1067d396703215c54acedbfd339"},"image":{"@id":"https:\/\/smitabharat.com\/blog\/go-defer-panic-recover\/#primaryimage"},"thumbnailUrl":"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-defer-panic-recover-featured.png","keywords":["Go Lang","Go Panic and Recover","Go Tutorial","Golang Basics"],"articleSection":["Go Lang"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/smitabharat.com\/blog\/go-defer-panic-recover\/","url":"https:\/\/smitabharat.com\/blog\/go-defer-panic-recover\/","name":"Go Panic and Recover with Defer Explained Simply","isPartOf":{"@id":"https:\/\/smitabharat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/smitabharat.com\/blog\/go-defer-panic-recover\/#primaryimage"},"image":{"@id":"https:\/\/smitabharat.com\/blog\/go-defer-panic-recover\/#primaryimage"},"thumbnailUrl":"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-defer-panic-recover-featured.png","datePublished":"2026-04-22T03:30:00+00:00","dateModified":"2026-10-10T15:50:53+00:00","description":"Learn Go panic and recover with simple examples: how defer works, what a panic does, recover inside defer and when to return errors.","breadcrumb":{"@id":"https:\/\/smitabharat.com\/blog\/go-defer-panic-recover\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/smitabharat.com\/blog\/go-defer-panic-recover\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/smitabharat.com\/blog\/go-defer-panic-recover\/#primaryimage","url":"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-defer-panic-recover-featured.png","contentUrl":"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-defer-panic-recover-featured.png","width":2400,"height":1260,"caption":"Go Panic and Recover featured image: cards for defer, panic and recover"},{"@type":"BreadcrumbList","@id":"https:\/\/smitabharat.com\/blog\/go-defer-panic-recover\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/smitabharat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Go Panic and Recover with Defer Explained"}]},{"@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\/283","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=283"}],"version-history":[{"count":1,"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/posts\/283\/revisions"}],"predecessor-version":[{"id":298,"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/posts\/283\/revisions\/298"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/media\/256"}],"wp:attachment":[{"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/media?parent=283"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/categories?post=283"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/tags?post=283"},{"taxonomy":"swapz_series","embeddable":true,"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/swapz_series?post=283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}