{"id":9892,"date":"2022-09-08T06:49:29","date_gmt":"2022-09-08T06:49:29","guid":{"rendered":"https:\/\/prwatech.in\/blog\/?p=9892"},"modified":"2024-04-15T10:48:46","modified_gmt":"2024-04-15T10:48:46","slug":"goroutines-in-go-language","status":"publish","type":"post","link":"https:\/\/prwatech.in\/blog\/go-lang\/goroutines-in-go-language\/","title":{"rendered":"Goroutines in Go Language"},"content":{"rendered":"<h2><span data-sheets-root=\"1\" data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Goroutines in Go Language&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:513,&quot;3&quot;:{&quot;1&quot;:0},&quot;12&quot;:0}\">Goroutines in Go Language<\/span><\/h2>\n<p>&nbsp;<\/p>\n<p>In Go language, Goroutine\u00a0is a lightweight <a href=\"https:\/\/prwatech.in\/blog\/go-lang\/installation-of-go-windows\/\">execution<\/a> thread. It is a <a href=\"https:\/\/go.dev\/\">function<\/a> that runs concurrency alongside other running code.<\/p>\n<p><strong>Note: &#8211;<\/strong> concurrent execution may or may not parallel. In Go, every program has at least one goroutine: the main goroutine. A goroutine is started with the\u00a0go\u00a0keywords.<\/p>\n<p>To run a function as a goroutine, call that function prefixed with the go statement<\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li>\n<h3><strong>creating Goroutines<\/strong><\/h3>\n<\/li>\n<\/ul>\n<p>by using the go keyword as a prefixing to the function or method call as shown below:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"golang\">Syntax:\r\nfunc name(){\r\n\/\/ statements\r\n}\r\n\/\/ using the go keyword as the \r\n\/\/ prefix of your function call\r\ngo name()\r\n<\/pre>\n<p>&nbsp;<\/p>\n<ol>\n<li>Program to illustrate the creation of Goroutines.\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"golang\">package main\r\nimport (\r\n    \"fmt\"\r\n    \"io\/ioutil\"\r\n    \"log\"\r\n    \"net\/http\"\r\n    \"time\"\r\n)\r\n\r\nfunc responseSize(url string) {\r\n    fmt.Println(\"Step1: \", url)\r\n    response, err := http.Get(url)\r\n    if err != nil {\r\n        log.Fatal(err)\r\n    }\r\n\r\n    fmt.Println(\"Step2: \", url)\r\n    defer response.Body.Close()\r\n\r\n    fmt.Println(\"Step3: \", url)\r\n    body, err := ioutil.ReadAll(response.Body)\r\n    if err != nil {\r\n        log.Fatal(err)\r\n    }\r\n    fmt.Println(\"Step4: \", len(body))\r\n}\r\n\r\nfunc main() {\r\n    go responseSize(\"https:\/\/www.prwatech.com\/\")\r\n    go responseSize(\"https:\/\/www.prwatech.com\/pages\/project\")\r\n    go responseSize(\"https:\/\/www.prwatech.com\/pages\/jobs\")\r\n    time.Sleep(10 * time.Second)\r\n}\r\n<\/pre>\n<p>Output :<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"golang\">PS C:\\GO_Language\\Goroutines&gt; go run g.go\r\nStep1:  https:\/\/www.prwatech.com\/pages\/jobs\r\nStep1:  https:\/\/www.prwatech.com\/\r\nStep1:  https:\/\/www.prwatech.com\/pages\/project\r\nStep2:  https:\/\/www.prwatech.com\/pages\/project\r\nStep3:  https:\/\/www.prwatech.com\/pages\/project\r\nStep4:  1098718\r\nStep2:  https:\/\/www.prwatech.com\/pages\/jobs\r\nStep3:  https:\/\/www.prwatech.com\/pages\/jobs\r\nStep4:  193698\r\nStep2:  https:\/\/www.prwatech.com\/\r\nStep3:  https:\/\/www.prwatech.com\/\r\nStep4:  98907\r\n<\/pre>\n<ul>\n<li><strong>Waiting for Goroutines to Finish Execution<\/strong><\/li>\n<li>\n<ul>\n<li><strong>ADD: &#8211;<\/strong> used to add a counter to the Wait Group.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul>\n<li><strong>DONE: &#8211;<\/strong> The Done method of Wait Group is scheduled using a defer statement to decrement the Wait Group counter.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul>\n<li><strong>WAIT: &#8211;<\/strong> The Wait method of the Wait Group type waits for the program to finish all goroutines.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"golang\">package main\r\nimport (\r\n    \"fmt\"\r\n    \"io\/ioutil\"\r\n    \"log\"\r\n    \"net\/http\"\r\n    \"sync\"\r\n)\r\n\r\nvar wg sync.WaitGroup\r\n\r\nfunc responseSize(url string) {\r\n    defer wg.Done()\r\n\r\n    fmt.Println(\"Step1: \", url)\r\n    response, err := http.Get(url)\r\n    if err != nil {\r\n        log.Fatal(err)\r\n    }\r\n\r\n    fmt.Println(\"Step2: \", url)\r\n    defer response.Body.Close()\r\n\r\n    fmt.Println(\"Step3: \", url)\r\n    body, err := ioutil.ReadAll(response.Body)\r\n    if err != nil {\r\n        log.Fatal(err)\r\n    }\r\n    fmt.Println(\"Step4: \", len(body))\r\n}\r\n\r\nfunc main() {\r\n    wg.Add(3)\r\n    fmt.Println(\"Start Goroutines\")\r\n\r\n    go responseSize(\"https:\/\/www.prwatech.com\/\")\r\n    go responseSize(\"https:\/\/www.prwatech.com\/pages\/project\")\r\n    go responseSize(\"https:\/\/www.prwatech.com\/pages\/jobs\")\r\n    wg.Wait()\r\n    fmt.Println(\"Terminating Program\")\r\n}\r\n<\/pre>\n<p>Output :<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"golang\">PS C:\\GO_Language\\Goroutines&gt; go run g2.go\r\nStart Goroutines\r\nStep1:  https:\/\/www.prwatech.com\/pages\/jobs\r\nStep1:  https:\/\/www.prwatech.com\/\r\nStep1:  https:\/\/www.prwatech.com\/pages\/project\r\nStep2:  https:\/\/www.prwatech.com\/pages\/project\r\nStep3:  https:\/\/www.prwatech.com\/pages\/project\r\nStep4:  1098718\r\nStep2:  https:\/\/www.prwatech.com\/pages\/jobs\r\nStep3:  https:\/\/www.prwatech.com\/pages\/jobs\r\nStep4:  193698\r\nStep2:  https:\/\/www.prwatech.com\/\r\nStep3:  https:\/\/www.prwatech.com\/\r\nStep4:  98907\r\nTerminating Program\r\n<\/pre>\n<\/li>\n<li>\n<h3><strong>Fetch Values from Goroutines in Go lang.<\/strong><\/h3>\n<\/li>\n<li>\n<ol>\n<li>Channel can be used to fetch return value from a goroutine. Channel provides synchronization and communication between goroutines.\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"golang\">package main\r\n    \r\nimport (\r\n    \"fmt\"\r\n    \"io\/ioutil\"\r\n    \"log\"\r\n    \"net\/http\"\r\n    \"sync\"\r\n)\r\n\r\nvar WG sync.WaitGroup\r\n\r\nfunc responseSize(url string, num chan int) {\r\n\r\n    defer WG.Done()\r\n\r\n    response, err := http.Get(url)\r\n    if err != nil {\r\n        log.Fatal(err)\r\n    }\r\n    defer response.Body.Close()\r\n    body, err := ioutil.ReadAll(response.Body)\r\n    if err != nil {\r\n        log.Fatal(err)\r\n    }\r\n\r\n    num &lt;- len(body)\r\n}\r\n\r\nfunc main() {\r\n    num := make(chan int)\r\n    WG.Add(1)\r\n    go responseSize(\"https:\/\/prwatech.in\/\", num)\r\n    fmt.Println(&lt;-num)\r\n    WG.Wait()\r\n    close(num)\r\n}\r\n<\/pre>\n<p>Output :<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">PS C:\\GO_Language\\Goroutines&gt; go run g3.go\r\n114307\r\n<\/pre>\n<ul>\n<li><strong>Play and Pause Execution of Goroutine in Go Lang.<\/strong><\/li>\n<li>A channel handles this communication by acting as a conduit between goroutines.\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"golang\">package main\r\nimport (\r\n    \"fmt\"\r\n    \"sync\"\r\n    \"time\"\r\n)\r\n\r\nvar x int\r\n\r\nfunc work() {\r\n    time.Sleep(100 * time.Millisecond)\r\n    x++\r\n    fmt.Println(x)\r\n}\r\n\r\nfunc routine(command &lt;-chan string, WG *sync.WaitGroup) {\r\n    defer WG.Done()\r\n    status := \"PLAY\"\r\n    for {\r\n        select {\r\n        case cmd := &lt;-command:\r\n            fmt.Println(cmd)\r\n            switch cmd {\r\n            case \"STOP\":\r\n                return\r\n            case \"PAUSE\":\r\n                status = \"PAUSE\"\r\n            default:\r\n                status = \"PLAY\"\r\n            }\r\n        default:\r\n            if status == \"PLAY\" {\r\n                work()\r\n            }\r\n        }\r\n    }\r\n}\r\n\r\nfunc main() {\r\n    var WG sync.WaitGroup\r\n    WG.Add(1)\r\n    commandS := make(chan string)\r\n    go routine(commandS, &amp;WG)\r\n\r\n    time.Sleep(1 * time.Second)\r\n    commandS &lt;- \"PAUSE\"\r\n\r\n    time.Sleep(1 * time.Second)\r\n    commandS &lt;- \"PLAY\"\r\n\r\n    time.Sleep(1 * time.Second)\r\n    commandS &lt;- \"STOP\"\r\n\r\n    WG.Wait()\r\n}\r\n<\/pre>\n<p>Output :<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">PS C:\\GO_Language\\Goroutines&gt; go run g4.go\r\n1\r\n2\r\n3\r\n4\r\n5\r\n6\r\n7\r\n8\r\n9\r\nPAUSE\r\nPLAY\r\n10\r\n11\r\n12\r\n13\r\n14\r\n15\r\n16\r\n17\r\n18\r\n19\r\nSTOP<\/pre>\n<ul>\n<li><strong>Fix Race Condition using Atomic Functions<\/strong>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"golang\">package main\r\n\r\nimport (\r\n    \"fmt\"\r\n    \"runtime\"\r\n    \"sync\"\r\n    \"sync\/atomic\"\r\n)\r\n\r\nvar (\r\n    counter int32         \t\t \r\n    wg      sync.WaitGroup   \t\r\n)\r\n\r\nfunc main() {\r\n    wg.Add(3) \r\n\r\n    go increment(\"Python\")\r\n    go increment(\"Java\")\r\n    go increment(\"Golang\")\r\n\r\n    wg.Wait() \r\n    fmt.Println(\"Counter:\", counter)\r\n\r\n}\r\n\r\nfunc increment(name string) {\r\n    defer wg.Done()\r\n\r\n    for range name {\r\n        atomic.AddInt32(&amp;counter, 1)\r\n        runtime.Gosched() \r\n    }\r\n}\r\n<\/pre>\n<p>Output :<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">PS C:\\GO_Language\\Goroutines&gt; go run g5.go\r\nCounter: 16\r\n<\/pre>\n<ul>\n<li><strong>Define Critical Sections using Mutex<\/strong>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"golang\">package main\r\n\r\nimport (\r\n    \"fmt\"\r\n    \"sync\"\r\n)\r\n\r\nvar (\r\n    counter int32          \r\n    wg      sync.WaitGroup\r\n    mutex   sync.Mutex     \r\n)\r\n\r\nfunc main() {\r\n    wg.Add(3) \r\n\r\n    go increment(\"Python\")\r\n    go increment(\"Go Programming Language\")\r\n    go increment(\"Java\")\r\n\r\n    wg.Wait() \r\n    fmt.Println(\"Counter:\", counter)\r\n\r\n}\r\n\r\nfunc increment(lang string) {\r\n    defer wg.Done() \r\n\r\n    for i := 0; i &lt; 3; i++ {\r\n        mutex.Lock()\r\n        {\r\n            fmt.Println(lang)\r\n            counter++\r\n        }\r\n        mutex.Unlock()\r\n    }\r\n}\r\n<\/pre>\n<p>Output :<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">PS C:\\GO_Language\\Goroutines&gt; go run g6.go\r\nJava\r\nJava\r\nJava\r\nPython\r\nPython\r\nPython\r\nGo Programming Language\r\nGo Programming Language\r\nGo Programming Language\r\nCounter: 9\r\n<\/pre>\n<p>Goroutines in Go Language<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Goroutines in Go Language &nbsp; In Go language, Goroutine\u00a0is a lightweight execution thread. It is a function that runs concurrency alongside other running code. Note: &#8211; concurrent execution may or may not parallel. In Go, every program has at least one goroutine: the main goroutine. A goroutine is started with the\u00a0go\u00a0keywords. To run a function [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[666,1707],"tags":[1607,1609,1606,1610,1608],"class_list":["post-9892","post","type-post","status-publish","format-standard","hentry","category-go-lang","category-golang-modules","tag-fetch-values","tag-fix-race-condition","tag-goroutines","tag-mutex","tag-play-and-pause"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Goroutines in Go Language - Prwatech<\/title>\n<meta name=\"description\" content=\"Master Goroutines in Go Language - Dive deep with our expert instructors and comprehensive curriculum, Enroll now.\" \/>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Goroutines in Go Language - Prwatech\" \/>\n<meta property=\"og:description\" content=\"Master Goroutines in Go Language - Dive deep with our expert instructors and comprehensive curriculum, Enroll now.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/prwatech.in\/blog\/go-lang\/goroutines-in-go-language\/\" \/>\n<meta property=\"og:site_name\" content=\"Prwatech\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prwatech.in\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-09-08T06:49:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-15T10:48:46+00:00\" \/>\n<meta name=\"author\" content=\"Prwatech\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@Eduprwatech\" \/>\n<meta name=\"twitter:site\" content=\"@Eduprwatech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prwatech\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/prwatech.in\/blog\/go-lang\/goroutines-in-go-language\/\",\"url\":\"https:\/\/prwatech.in\/blog\/go-lang\/goroutines-in-go-language\/\",\"name\":\"Goroutines in Go Language - Prwatech\",\"isPartOf\":{\"@id\":\"https:\/\/prwatech.in\/blog\/#website\"},\"datePublished\":\"2022-09-08T06:49:29+00:00\",\"dateModified\":\"2024-04-15T10:48:46+00:00\",\"author\":{\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3\"},\"description\":\"Master Goroutines in Go Language - Dive deep with our expert instructors and comprehensive curriculum, Enroll now.\",\"breadcrumb\":{\"@id\":\"https:\/\/prwatech.in\/blog\/go-lang\/goroutines-in-go-language\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/prwatech.in\/blog\/go-lang\/goroutines-in-go-language\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/prwatech.in\/blog\/go-lang\/goroutines-in-go-language\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/prwatech.in\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Goroutines in Go Language\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/prwatech.in\/blog\/#website\",\"url\":\"https:\/\/prwatech.in\/blog\/\",\"name\":\"Prwatech\",\"description\":\"Share Ideas, Start Something Good.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/prwatech.in\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3\",\"name\":\"Prwatech\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g\",\"caption\":\"Prwatech\"},\"url\":\"https:\/\/prwatech.in\/blog\/author\/prwatech123\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Goroutines in Go Language - Prwatech","description":"Master Goroutines in Go Language - Dive deep with our expert instructors and comprehensive curriculum, Enroll now.","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"Goroutines in Go Language - Prwatech","og_description":"Master Goroutines in Go Language - Dive deep with our expert instructors and comprehensive curriculum, Enroll now.","og_url":"https:\/\/prwatech.in\/blog\/go-lang\/goroutines-in-go-language\/","og_site_name":"Prwatech","article_publisher":"https:\/\/www.facebook.com\/prwatech.in\/","article_published_time":"2022-09-08T06:49:29+00:00","article_modified_time":"2024-04-15T10:48:46+00:00","author":"Prwatech","twitter_card":"summary_large_image","twitter_creator":"@Eduprwatech","twitter_site":"@Eduprwatech","twitter_misc":{"Written by":"Prwatech","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/prwatech.in\/blog\/go-lang\/goroutines-in-go-language\/","url":"https:\/\/prwatech.in\/blog\/go-lang\/goroutines-in-go-language\/","name":"Goroutines in Go Language - Prwatech","isPartOf":{"@id":"https:\/\/prwatech.in\/blog\/#website"},"datePublished":"2022-09-08T06:49:29+00:00","dateModified":"2024-04-15T10:48:46+00:00","author":{"@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3"},"description":"Master Goroutines in Go Language - Dive deep with our expert instructors and comprehensive curriculum, Enroll now.","breadcrumb":{"@id":"https:\/\/prwatech.in\/blog\/go-lang\/goroutines-in-go-language\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/prwatech.in\/blog\/go-lang\/goroutines-in-go-language\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/prwatech.in\/blog\/go-lang\/goroutines-in-go-language\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/prwatech.in\/blog\/"},{"@type":"ListItem","position":2,"name":"Goroutines in Go Language"}]},{"@type":"WebSite","@id":"https:\/\/prwatech.in\/blog\/#website","url":"https:\/\/prwatech.in\/blog\/","name":"Prwatech","description":"Share Ideas, Start Something Good.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/prwatech.in\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3","name":"Prwatech","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g","caption":"Prwatech"},"url":"https:\/\/prwatech.in\/blog\/author\/prwatech123\/"}]}},"_links":{"self":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/9892","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/comments?post=9892"}],"version-history":[{"count":4,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/9892\/revisions"}],"predecessor-version":[{"id":11545,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/9892\/revisions\/11545"}],"wp:attachment":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/media?parent=9892"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/categories?post=9892"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/tags?post=9892"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}