[{"data":1,"prerenderedAt":1616},["ShallowReactive",2],{"blog-introduction-to-goroutines":3,"blog-all-for-related":1150},{"id":4,"title":5,"author":6,"body":7,"cardAlt":5,"categories":1136,"description":1138,"draft":1139,"extension":1140,"headerImage":1141,"keywords":1142,"meta":1143,"name":1144,"navigation":135,"path":1145,"seo":1146,"series":6,"stem":1147,"updated":6,"year":1148,"__hash__":1149},"blog\u002Fblog\u002Fintroduction-to-goroutines.md","Introduction to Goroutines",null,{"type":8,"value":9,"toc":1127},"minimark",[10,21,26,29,38,48,51,68,77,1123],[11,12,13,20],"p",{},[14,15,19],"a",{"href":16,"rel":17},"https:\u002F\u002Fgolang.org\u002F",[18],"nofollow","Golang"," is a popular programming language. One of the major reasons people start using Go is due to its concurrency powers. In this article, we will learn the basics of concurrency and how Goroutines work.",[22,23,25],"h2",{"id":24},"concurrency-vs-parallelism","Concurrency vs Parallelism",[11,27,28],{},"Before we do a deep dive into Goroutines, let's first try to understand what is concurrency and how it is different from parallelism.",[11,30,31,32,37],{},"Concurrency is the execution of the multiple instruction sequences at the same time. It is composition of independently executing process. The execution order of tasks doesn't effect the end result. There is a ",[14,33,36],{"href":34,"rel":35},"https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=oV9rvDllKEg",[18],"brilliant 30 min talk"," by Rob Pike where is explains how Concurrency is different from Parallelism. I highly recommend watching it to understand the core difference. Two key differences explained by Rob are -",[39,40,41,45],"ul",{},[42,43,44],"li",{},"Parallelism is simultaneous execution of multiple things at once. While Concurrency is composition of independently executing tasks.",[42,46,47],{},"Concurrency is about dealing with lots of things at once. Parallelism is about doing lots of things at once.",[11,49,50],{},"Time for an example. In modern world, most applications and websites perform multiple independent tasks together. Let's take Amazon and try to see what kind of concurrent processes it runs when we visit it.",[39,52,53,56,59,62,65],{},[42,54,55],{},"Fetching recommended product for each user on home page",[42,57,58],{},"Getting best offers to lure you to buy products.",[42,60,61],{},"Fetching user reviews, product details and images for product you click.",[42,63,64],{},"Preparing a cart as you add items to it.",[42,66,67],{},"Processing payments, generating invoices, sending email about the purchase, etc.",[11,69,70,71,76],{},"So, there are hundreds of background tasks running concurrently to serve you. Thereby concurrency is super vital to build a good user experience. Do check my tutorial on ",[14,72,75],{"href":73,"rel":74},"https:\u002F\u002Fwww.mohitkhare.com\u002Fblog\u002Frunning-periodic-background-task-golang",[18],"running background tasks"," in Go.",[78,79,80,83,87,90,101,109,309,319,335,344,511,518,549,555,559,565,582,854,857,923,927,930,1033,1037,1067,1072,1095,1103,1105,1108,1117],"ads",{},[81,82],"hr",{},[22,84,86],{"id":85},"what-are-goroutines","What are Goroutines?",[11,88,89],{},"Goroutine are Golang's solution to solving the concurrency problem. These are functions that run concurrently with other functions or methods. The concept is similar to that of threads in languages like Java but Goroutines are much more efficient and light-weight. We have a list of tasks, each of the individual tasks is assigned to a Goroutine which execute the tasks independenty.",[39,91,92,95,98],{},[42,93,94],{},"Goroutines run in same address space.",[42,96,97],{},"They are much cheap to create comparing to threads - only 2kB of stack space.",[42,99,100],{},"Less switching costs. Goroutines are managed by a scheduler and they don't directly interact with the OS kernel.",[11,102,103,104,108],{},"To use goroutines in golang - we have a ",[105,106,107],"code",{},"go"," keyword. Let's see a working example to learn more.",[110,111,115],"pre",{"className":112,"code":113,"language":107,"meta":114,"style":114},"language-go shiki shiki-themes github-light github-dark","package main\n\nimport (\n    \"fmt\"\n)\n\nfunc performSum(a int, b int) {\n    sum := a + b\n    fmt.Println(\"Sum of \", a, \" and \", b, \" is: \", sum)\n}\n\nfunc main() {\n    go performSum(10, 20)\n    fmt.Println(\"Back to main function\")\n}\n","",[105,116,117,130,137,147,160,166,171,200,218,247,253,258,269,290,304],{"__ignoreMap":114},[118,119,122,126],"span",{"class":120,"line":121},"line",1,[118,123,125],{"class":124},"szBVR","package",[118,127,129],{"class":128},"sScJk"," main\n",[118,131,133],{"class":120,"line":132},2,[118,134,136],{"emptyLinePlaceholder":135},true,"\n",[118,138,140,143],{"class":120,"line":139},3,[118,141,142],{"class":124},"import",[118,144,146],{"class":145},"sVt8B"," (\n",[118,148,150,154,157],{"class":120,"line":149},4,[118,151,153],{"class":152},"sZZnC","    \"",[118,155,156],{"class":128},"fmt",[118,158,159],{"class":152},"\"\n",[118,161,163],{"class":120,"line":162},5,[118,164,165],{"class":145},")\n",[118,167,169],{"class":120,"line":168},6,[118,170,136],{"emptyLinePlaceholder":135},[118,172,174,177,180,183,186,189,192,195,197],{"class":120,"line":173},7,[118,175,176],{"class":124},"func",[118,178,179],{"class":128}," performSum",[118,181,182],{"class":145},"(",[118,184,14],{"class":185},"s4XuR",[118,187,188],{"class":124}," int",[118,190,191],{"class":145},", ",[118,193,194],{"class":185},"b",[118,196,188],{"class":124},[118,198,199],{"class":145},") {\n",[118,201,203,206,209,212,215],{"class":120,"line":202},8,[118,204,205],{"class":145},"    sum ",[118,207,208],{"class":124},":=",[118,210,211],{"class":145}," a ",[118,213,214],{"class":124},"+",[118,216,217],{"class":145}," b\n",[118,219,221,224,227,229,232,235,238,241,244],{"class":120,"line":220},9,[118,222,223],{"class":145},"    fmt.",[118,225,226],{"class":128},"Println",[118,228,182],{"class":145},[118,230,231],{"class":152},"\"Sum of \"",[118,233,234],{"class":145},", a, ",[118,236,237],{"class":152},"\" and \"",[118,239,240],{"class":145},", b, ",[118,242,243],{"class":152},"\" is: \"",[118,245,246],{"class":145},", sum)\n",[118,248,250],{"class":120,"line":249},10,[118,251,252],{"class":145},"}\n",[118,254,256],{"class":120,"line":255},11,[118,257,136],{"emptyLinePlaceholder":135},[118,259,261,263,266],{"class":120,"line":260},12,[118,262,176],{"class":124},[118,264,265],{"class":128}," main",[118,267,268],{"class":145},"() {\n",[118,270,272,275,277,279,283,285,288],{"class":120,"line":271},13,[118,273,274],{"class":124},"    go",[118,276,179],{"class":128},[118,278,182],{"class":145},[118,280,282],{"class":281},"sj4cs","10",[118,284,191],{"class":145},[118,286,287],{"class":281},"20",[118,289,165],{"class":145},[118,291,293,295,297,299,302],{"class":120,"line":292},14,[118,294,223],{"class":145},[118,296,226],{"class":128},[118,298,182],{"class":145},[118,300,301],{"class":152},"\"Back to main function\"",[118,303,165],{"class":145},[118,305,307],{"class":120,"line":306},15,[118,308,252],{"class":145},[11,310,311,312,315,316,318],{},"In the above code, we have a simple ",[105,313,314],{},"performSum"," function which adds two numbers. In main we call this function with the ",[105,317,107],{}," keyword i.e we call this function concurrently. Now, guess the output for the code above?",[110,320,322],{"className":112,"code":321,"language":107,"meta":114,"style":114},"\u002F\u002F Output\nBack to main function\n",[105,323,324,330],{"__ignoreMap":114},[118,325,326],{"class":120,"line":121},[118,327,329],{"class":328},"sJ8bj","\u002F\u002F Output\n",[118,331,332],{"class":120,"line":132},[118,333,334],{"class":145},"Back to main function\n",[11,336,337,338,340,341,343],{},"Surprised eh? Where is the print statement from ",[105,339,314],{}," ? The reason we don't see the print statement is because our program exited before ",[105,342,314],{}," could evaluate the sum. The go control does not wait for the Goroutine to finish executing rather prints the main function and exits. So to actually get the result we need to prevent our main to exit. Let's do that.",[110,345,347],{"className":112,"code":346,"language":107,"meta":114,"style":114},"package main\n\nimport (\n    \"fmt\"\n    \"time\"\n)\n\nfunc performSum(a int, b int) {\n    sum := a + b\n    fmt.Println(\"Sum of \", a, \" and \", b, \" is: \", sum)\n}\n\nfunc main() {\n    go performSum(10, 20)\n    time.Sleep(1 * time.Second)\n    fmt.Println(\"Back to main function\")\n}\n",[105,348,349,355,359,365,373,382,386,390,410,422,442,446,450,458,474,493,506],{"__ignoreMap":114},[118,350,351,353],{"class":120,"line":121},[118,352,125],{"class":124},[118,354,129],{"class":128},[118,356,357],{"class":120,"line":132},[118,358,136],{"emptyLinePlaceholder":135},[118,360,361,363],{"class":120,"line":139},[118,362,142],{"class":124},[118,364,146],{"class":145},[118,366,367,369,371],{"class":120,"line":149},[118,368,153],{"class":152},[118,370,156],{"class":128},[118,372,159],{"class":152},[118,374,375,377,380],{"class":120,"line":162},[118,376,153],{"class":152},[118,378,379],{"class":128},"time",[118,381,159],{"class":152},[118,383,384],{"class":120,"line":168},[118,385,165],{"class":145},[118,387,388],{"class":120,"line":173},[118,389,136],{"emptyLinePlaceholder":135},[118,391,392,394,396,398,400,402,404,406,408],{"class":120,"line":202},[118,393,176],{"class":124},[118,395,179],{"class":128},[118,397,182],{"class":145},[118,399,14],{"class":185},[118,401,188],{"class":124},[118,403,191],{"class":145},[118,405,194],{"class":185},[118,407,188],{"class":124},[118,409,199],{"class":145},[118,411,412,414,416,418,420],{"class":120,"line":220},[118,413,205],{"class":145},[118,415,208],{"class":124},[118,417,211],{"class":145},[118,419,214],{"class":124},[118,421,217],{"class":145},[118,423,424,426,428,430,432,434,436,438,440],{"class":120,"line":249},[118,425,223],{"class":145},[118,427,226],{"class":128},[118,429,182],{"class":145},[118,431,231],{"class":152},[118,433,234],{"class":145},[118,435,237],{"class":152},[118,437,240],{"class":145},[118,439,243],{"class":152},[118,441,246],{"class":145},[118,443,444],{"class":120,"line":255},[118,445,252],{"class":145},[118,447,448],{"class":120,"line":260},[118,449,136],{"emptyLinePlaceholder":135},[118,451,452,454,456],{"class":120,"line":271},[118,453,176],{"class":124},[118,455,265],{"class":128},[118,457,268],{"class":145},[118,459,460,462,464,466,468,470,472],{"class":120,"line":292},[118,461,274],{"class":124},[118,463,179],{"class":128},[118,465,182],{"class":145},[118,467,282],{"class":281},[118,469,191],{"class":145},[118,471,287],{"class":281},[118,473,165],{"class":145},[118,475,476,479,482,484,487,490],{"class":120,"line":306},[118,477,478],{"class":145},"    time.",[118,480,481],{"class":128},"Sleep",[118,483,182],{"class":145},[118,485,486],{"class":281},"1",[118,488,489],{"class":124}," *",[118,491,492],{"class":145}," time.Second)\n",[118,494,496,498,500,502,504],{"class":120,"line":495},16,[118,497,223],{"class":145},[118,499,226],{"class":128},[118,501,182],{"class":145},[118,503,301],{"class":152},[118,505,165],{"class":145},[118,507,509],{"class":120,"line":508},17,[118,510,252],{"class":145},[11,512,513,514,517],{},"Now, we added a ",[105,515,516],{},"Sleep()"," which results in main to sleep for 1 second giving goroutine enough time to execute and return. The output looks like -",[110,519,521],{"className":112,"code":520,"language":107,"meta":114,"style":114},"\u002F\u002F Output\nSum of  10  and  20  is:  30\nBack to main function\n",[105,522,523,527,545],{"__ignoreMap":114},[118,524,525],{"class":120,"line":121},[118,526,329],{"class":328},[118,528,529,532,534,537,539,542],{"class":120,"line":132},[118,530,531],{"class":145},"Sum of  ",[118,533,282],{"class":281},[118,535,536],{"class":145},"  and  ",[118,538,287],{"class":281},[118,540,541],{"class":145},"  is:  ",[118,543,544],{"class":281},"30\n",[118,546,547],{"class":120,"line":139},[118,548,334],{"class":145},[11,550,551,552,554],{},"But, you must be thinking isn't this a wrong way. How would one know how much time to wait for each Goroutine to execute. Correct, here I used ",[105,553,516],{}," method just to demonstrate, the right way is to use channels and wait groups. Channels can be thought of as pipes using which Goroutine communicate. I'll cover details about channels in another article.",[22,556,558],{"id":557},"understanding-concurrency-in-go-with-example","Understanding Concurrency in Go with Example",[11,560,561],{},[562,563],"img",{"alt":558,"src":564},"https:\u002F\u002Fwww.mohitkhare.com\u002Fimages\u002Fblog\u002Fintroduction-to-goroutines\u002Fgoroutine-example.webp",[11,566,567,568,571,572,575,576,578,579,581],{},"Let's do one more slightly complex example. Here we have two functions ",[105,569,570],{},"tableOfFive()"," and ",[105,573,574],{},"tableOfSix()"," which print first 5 numbers in table of 5 and 6 respectively. We add a deliberate ",[105,577,516],{}," in two functions so that we can see both these functions are running concurrently and independent of each other. Finally, we need to add a ",[105,580,516],{}," in main to wait for above two functions to execute completely.",[110,583,585],{"className":112,"code":584,"language":107,"meta":114,"style":114},"package main\n\nimport (\n    \"fmt\"\n    \"time\"\n)\n\nfunc tableOfFive() {\n    for i := 1; i \u003C= 5; i++ {\n        fmt.Println(i * 5)\n        time.Sleep(250 * time.Millisecond)\n    }\n}\n\nfunc tableOfSix() {\n    for i := 1; i \u003C= 5; i++ {\n        fmt.Println(i * 6)\n        time.Sleep(500 * time.Millisecond)\n    }\n}\n\nfunc main() {\n    go tableOfFive()\n    go tableOfSix()\n    time.Sleep(5 * time.Second)\n    fmt.Println(\"Back to main\")\n}\n",[105,586,587,593,597,603,611,619,623,627,636,667,684,701,706,710,714,723,745,760,776,781,786,791,800,810,819,835,849],{"__ignoreMap":114},[118,588,589,591],{"class":120,"line":121},[118,590,125],{"class":124},[118,592,129],{"class":128},[118,594,595],{"class":120,"line":132},[118,596,136],{"emptyLinePlaceholder":135},[118,598,599,601],{"class":120,"line":139},[118,600,142],{"class":124},[118,602,146],{"class":145},[118,604,605,607,609],{"class":120,"line":149},[118,606,153],{"class":152},[118,608,156],{"class":128},[118,610,159],{"class":152},[118,612,613,615,617],{"class":120,"line":162},[118,614,153],{"class":152},[118,616,379],{"class":128},[118,618,159],{"class":152},[118,620,621],{"class":120,"line":168},[118,622,165],{"class":145},[118,624,625],{"class":120,"line":173},[118,626,136],{"emptyLinePlaceholder":135},[118,628,629,631,634],{"class":120,"line":202},[118,630,176],{"class":124},[118,632,633],{"class":128}," tableOfFive",[118,635,268],{"class":145},[118,637,638,641,644,646,649,652,655,658,661,664],{"class":120,"line":220},[118,639,640],{"class":124},"    for",[118,642,643],{"class":145}," i ",[118,645,208],{"class":124},[118,647,648],{"class":281}," 1",[118,650,651],{"class":145},"; i ",[118,653,654],{"class":124},"\u003C=",[118,656,657],{"class":281}," 5",[118,659,660],{"class":145},"; i",[118,662,663],{"class":124},"++",[118,665,666],{"class":145}," {\n",[118,668,669,672,674,677,680,682],{"class":120,"line":249},[118,670,671],{"class":145},"        fmt.",[118,673,226],{"class":128},[118,675,676],{"class":145},"(i ",[118,678,679],{"class":124},"*",[118,681,657],{"class":281},[118,683,165],{"class":145},[118,685,686,689,691,693,696,698],{"class":120,"line":255},[118,687,688],{"class":145},"        time.",[118,690,481],{"class":128},[118,692,182],{"class":145},[118,694,695],{"class":281},"250",[118,697,489],{"class":124},[118,699,700],{"class":145}," time.Millisecond)\n",[118,702,703],{"class":120,"line":260},[118,704,705],{"class":145},"    }\n",[118,707,708],{"class":120,"line":271},[118,709,252],{"class":145},[118,711,712],{"class":120,"line":292},[118,713,136],{"emptyLinePlaceholder":135},[118,715,716,718,721],{"class":120,"line":306},[118,717,176],{"class":124},[118,719,720],{"class":128}," tableOfSix",[118,722,268],{"class":145},[118,724,725,727,729,731,733,735,737,739,741,743],{"class":120,"line":495},[118,726,640],{"class":124},[118,728,643],{"class":145},[118,730,208],{"class":124},[118,732,648],{"class":281},[118,734,651],{"class":145},[118,736,654],{"class":124},[118,738,657],{"class":281},[118,740,660],{"class":145},[118,742,663],{"class":124},[118,744,666],{"class":145},[118,746,747,749,751,753,755,758],{"class":120,"line":508},[118,748,671],{"class":145},[118,750,226],{"class":128},[118,752,676],{"class":145},[118,754,679],{"class":124},[118,756,757],{"class":281}," 6",[118,759,165],{"class":145},[118,761,763,765,767,769,772,774],{"class":120,"line":762},18,[118,764,688],{"class":145},[118,766,481],{"class":128},[118,768,182],{"class":145},[118,770,771],{"class":281},"500",[118,773,489],{"class":124},[118,775,700],{"class":145},[118,777,779],{"class":120,"line":778},19,[118,780,705],{"class":145},[118,782,784],{"class":120,"line":783},20,[118,785,252],{"class":145},[118,787,789],{"class":120,"line":788},21,[118,790,136],{"emptyLinePlaceholder":135},[118,792,794,796,798],{"class":120,"line":793},22,[118,795,176],{"class":124},[118,797,265],{"class":128},[118,799,268],{"class":145},[118,801,803,805,807],{"class":120,"line":802},23,[118,804,274],{"class":124},[118,806,633],{"class":128},[118,808,809],{"class":145},"()\n",[118,811,813,815,817],{"class":120,"line":812},24,[118,814,274],{"class":124},[118,816,720],{"class":128},[118,818,809],{"class":145},[118,820,822,824,826,828,831,833],{"class":120,"line":821},25,[118,823,478],{"class":145},[118,825,481],{"class":128},[118,827,182],{"class":145},[118,829,830],{"class":281},"5",[118,832,489],{"class":124},[118,834,492],{"class":145},[118,836,838,840,842,844,847],{"class":120,"line":837},26,[118,839,223],{"class":145},[118,841,226],{"class":128},[118,843,182],{"class":145},[118,845,846],{"class":152},"\"Back to main\"",[118,848,165],{"class":145},[118,850,852],{"class":120,"line":851},27,[118,853,252],{"class":145},[11,855,856],{},"The output for the above code might be different for you but you will be mix of numbers from table of 5 and 6. Here is what I got as output.",[110,858,862],{"className":859,"code":860,"language":861,"meta":114,"style":114},"language-bash shiki shiki-themes github-light github-dark","5\n6\n10\n15\n12\n20\n25\n18\n24\n30\nBack to main\n","bash",[105,863,864,869,874,879,884,889,894,899,904,909,913],{"__ignoreMap":114},[118,865,866],{"class":120,"line":121},[118,867,868],{"class":128},"5\n",[118,870,871],{"class":120,"line":132},[118,872,873],{"class":128},"6\n",[118,875,876],{"class":120,"line":139},[118,877,878],{"class":128},"10\n",[118,880,881],{"class":120,"line":149},[118,882,883],{"class":128},"15\n",[118,885,886],{"class":120,"line":162},[118,887,888],{"class":128},"12\n",[118,890,891],{"class":120,"line":168},[118,892,893],{"class":128},"20\n",[118,895,896],{"class":120,"line":173},[118,897,898],{"class":128},"25\n",[118,900,901],{"class":120,"line":202},[118,902,903],{"class":128},"18\n",[118,905,906],{"class":120,"line":220},[118,907,908],{"class":128},"24\n",[118,910,911],{"class":120,"line":249},[118,912,544],{"class":128},[118,914,915,918,921],{"class":120,"line":255},[118,916,917],{"class":128},"Back",[118,919,920],{"class":152}," to",[118,922,129],{"class":152},[22,924,926],{"id":925},"test-yourself","Test yourself",[11,928,929],{},"A quick check on the basics. Pick an option to see the answer.",[110,931,935],{"className":932,"code":933,"language":934,"meta":114,"style":114},"language-quiz shiki shiki-themes github-light github-dark","[\n  {\n    \"q\": \"What keyword launches a function as a Goroutine?\",\n    \"options\": [\"defer\", \"go\", \"async\", \"spawn\"],\n    \"answer\": 1,\n    \"explain\": \"The go keyword runs a function concurrently, like go performSum(10, 20).\"\n  },\n  {\n    \"q\": \"Why did the first example only print 'Back to main function'?\",\n    \"options\": [\"Main exited before the Goroutine finished\", \"The Goroutine panicked\", \"The wait was too short\", \"Channels blocked the run\"],\n    \"answer\": 0,\n    \"explain\": \"Use go and it does not wait: main returned and exited before performSum could print its sum.\"\n  },\n  {\n    \"q\": \"About how much stack does a Goroutine start with compared to a thread?\",\n    \"options\": [\"2 kB\", \"2 MB\", \"200 kB\", \"2 bytes\"],\n    \"answer\": 0,\n    \"explain\": \"Goroutines are cheap to create, using only about 2 kB of stack space, with less switching cost.\"\n  }\n]\n","quiz",[105,936,937,942,947,952,957,962,967,972,976,981,986,991,996,1000,1004,1009,1014,1018,1023,1028],{"__ignoreMap":114},[118,938,939],{"class":120,"line":121},[118,940,941],{},"[\n",[118,943,944],{"class":120,"line":132},[118,945,946],{},"  {\n",[118,948,949],{"class":120,"line":139},[118,950,951],{},"    \"q\": \"What keyword launches a function as a Goroutine?\",\n",[118,953,954],{"class":120,"line":149},[118,955,956],{},"    \"options\": [\"defer\", \"go\", \"async\", \"spawn\"],\n",[118,958,959],{"class":120,"line":162},[118,960,961],{},"    \"answer\": 1,\n",[118,963,964],{"class":120,"line":168},[118,965,966],{},"    \"explain\": \"The go keyword runs a function concurrently, like go performSum(10, 20).\"\n",[118,968,969],{"class":120,"line":173},[118,970,971],{},"  },\n",[118,973,974],{"class":120,"line":202},[118,975,946],{},[118,977,978],{"class":120,"line":220},[118,979,980],{},"    \"q\": \"Why did the first example only print 'Back to main function'?\",\n",[118,982,983],{"class":120,"line":249},[118,984,985],{},"    \"options\": [\"Main exited before the Goroutine finished\", \"The Goroutine panicked\", \"The wait was too short\", \"Channels blocked the run\"],\n",[118,987,988],{"class":120,"line":255},[118,989,990],{},"    \"answer\": 0,\n",[118,992,993],{"class":120,"line":260},[118,994,995],{},"    \"explain\": \"Use go and it does not wait: main returned and exited before performSum could print its sum.\"\n",[118,997,998],{"class":120,"line":271},[118,999,971],{},[118,1001,1002],{"class":120,"line":292},[118,1003,946],{},[118,1005,1006],{"class":120,"line":306},[118,1007,1008],{},"    \"q\": \"About how much stack does a Goroutine start with compared to a thread?\",\n",[118,1010,1011],{"class":120,"line":495},[118,1012,1013],{},"    \"options\": [\"2 kB\", \"2 MB\", \"200 kB\", \"2 bytes\"],\n",[118,1015,1016],{"class":120,"line":508},[118,1017,990],{},[118,1019,1020],{"class":120,"line":762},[118,1021,1022],{},"    \"explain\": \"Goroutines are cheap to create, using only about 2 kB of stack space, with less switching cost.\"\n",[118,1024,1025],{"class":120,"line":778},[118,1026,1027],{},"  }\n",[118,1029,1030],{"class":120,"line":783},[118,1031,1032],{},"]\n",[22,1034,1036],{"id":1035},"resources","Resources",[39,1038,1039,1046,1053,1060],{},[42,1040,1041],{},[14,1042,1045],{"href":1043,"rel":1044},"https:\u002F\u002Fblog.nindalf.com\u002Fposts\u002Fhow-goroutines-work\u002F",[18],"How Goroutine work",[42,1047,1048],{},[14,1049,1052],{"href":1050,"rel":1051},"https:\u002F\u002Frakyll.org\u002Fscheduler\u002F",[18],"Go's work-stealing scheduler",[42,1054,1055],{},[14,1056,1059],{"href":1057,"rel":1058},"https:\u002F\u002Fwww.golang-book.com\u002Fbooks\u002Fintro\u002F10",[18],"Concurrency - The Golang Book",[42,1061,1062],{},[14,1063,1066],{"href":1064,"rel":1065},"https:\u002F\u002Fwww.educative.io\u002Fexplore?aff=K3zN",[18],"Explore awesome courses on Educative",[1068,1069,1071],"h3",{"id":1070},"books-to-learn-golang","Books to learn Golang",[39,1073,1074,1081,1088],{},[42,1075,1076],{},[14,1077,1080],{"href":1078,"rel":1079},"https:\u002F\u002Famzn.to\u002F3fYLCqz",[18],"Go Programming Language",[42,1082,1083],{},[14,1084,1087],{"href":1085,"rel":1086},"https:\u002F\u002Famzn.to\u002F3s7fWS3",[18],"Learning Go",[42,1089,1090],{},[14,1091,1094],{"href":1092,"rel":1093},"https:\u002F\u002Famzn.to\u002F3t6PM37",[18],"Go in Action",[11,1096,1097,1098,1102],{},"More articles on ",[14,1099,19],{"href":1100,"rel":1101},"https:\u002F\u002Fwww.mohitkhare.com\u002Fcategories\u002Fgolang",[18]," you might find interesting.",[81,1104],{},[11,1106,1107],{},"I hope you learned something new. Feel free to suggest improvements ✔️",[11,1109,1110,1111,1116],{},"I share regular updates and resources on ",[14,1112,1115],{"href":1113,"rel":1114},"https:\u002F\u002Ftwitter.com\u002Fmkfeuhrer",[18],"Twitter",". Let's connect!",[11,1118,1119],{},[1120,1121,1122],"strong",{},"Keep exploring 🔎 Keep learning 🚀",[1124,1125,1126],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":114,"searchDepth":132,"depth":132,"links":1128},[1129,1130,1131,1132,1133],{"id":24,"depth":132,"text":25},{"id":85,"depth":132,"text":86},{"id":557,"depth":132,"text":558},{"id":925,"depth":132,"text":926},{"id":1035,"depth":132,"text":1036,"children":1134},[1135],{"id":1070,"depth":139,"text":1071},[19,1137],"Programming","Understand the basics of concurrency and learn how to work with Goroutines in golang.",false,"md","blog\u002Fintroduction-to-goroutines\u002Fintroduction-to-goroutines-card.webp","goroutines golang, concurrency in golang, understanding goroutines",{},"introduction-to-goroutines","\u002Fblog\u002Fintroduction-to-goroutines",{"title":5,"description":1138},"blog\u002Fintroduction-to-goroutines","2021-04-10","hSRCkHJopeqCWx7Rx8yg8MIBdD7ajfC_fX-kB0QDPaA",[1151,1158,1164,1172,1181,1188,1195,1202,1208,1214,1220,1226,1232,1241,1247,1254,1260,1266,1272,1278,1284,1290,1296,1302,1309,1316,1322,1328,1334,1340,1346,1348,1354,1360,1366,1372,1378,1384,1390,1397,1403,1409,1415,1422,1428,1434,1441,1448,1454,1461,1467,1474,1480,1487,1493,1499,1505,1511,1517,1523,1529,1535,1541,1547,1553,1559,1566,1572,1579,1585,1591,1597,1604,1610],{"path":1152,"title":1153,"description":1154,"categories":1155,"draft":135,"year":1157,"series":6},"\u002Fblog\u002Fai-assisted-workstation","Building an AI-Assisted Personal Workstation","How I built a personal AI workstation: markdown knowledge base, portable agent skills, handoff-driven sessions. What worked, what broke, what I would change.",[1156,1137],"Productivity","2026-08-26",{"path":1159,"title":1160,"description":1161,"categories":1162,"draft":1139,"year":1163,"series":6},"\u002Fblog\u002Faws-s3-golang","Uploading images to AWS S3 in Golang","In this tutorial I cover how to upload, fetch and manage other operations for objects on AWS S3 in Golang",[19,1137],"2020-01-12",{"path":1165,"title":1166,"description":1167,"categories":1168,"draft":1139,"year":1171,"series":6},"\u002Fblog\u002Fbooks-for-engineers","Best Books for Software Engineers","Best Books to help you build you software engineering career - ranging from fundamentats, interview prep to productivity.",[1169,1170],"Books","Life","2021-12-26",{"path":1173,"title":1174,"description":1175,"categories":1176,"draft":1139,"year":1180,"series":6},"\u002Fblog\u002Fbuilding-acrons","Building Acrons 🚀","Building Acrons, a one-stop tool to decode everyday acronyms like DIY, FOMO, and BRB without losing your flow.",[1177,1178,1179],"Side Projects","Web","Tools","2020-05-26",{"path":1182,"title":1183,"description":1184,"categories":1185,"draft":1139,"year":1187,"series":6},"\u002Fblog\u002Fcap-theorem","CAP Theorem Explained","Learn the concept and misconceptions around popular CAP theorem in system design.",[1186,1137],"System Design","2021-07-26",{"path":1189,"title":1190,"description":1191,"categories":1192,"draft":1139,"year":1194,"series":6},"\u002Fblog\u002Fcode-reviews","Code Review Checklist","Why code reviews matter, and best practices that catch bugs early and keep code quality high before merge.",[1193],"Engineering Principles","2020-07-20",{"path":1196,"title":1197,"description":1198,"categories":1199,"draft":1139,"year":1201,"series":6},"\u002Fblog\u002Fdark-mode","Add Dark mode to websites","Dark mode is ❤️️ Add it to your websites with little CSS and JS",[1200,1178],"Javascript","2020-07-04",{"path":1203,"title":1204,"description":1205,"categories":1206,"draft":1139,"year":1207,"series":6},"\u002Fblog\u002Fdate-time-golang","Working with Date and Time in Go","Learn how to use time in Golang - Multiple formats, locations and using date.",[19,1137],"2020-10-09",{"path":1209,"title":1210,"description":1211,"categories":1212,"draft":1139,"year":1213,"series":6},"\u002Fblog\u002Fdefer-in-golang","Understanding Defer In Golang","Learn about defer keyword in golang and how it can help you avoid panics due to bugs.",[19,1137],"2021-05-05",{"path":1215,"title":1216,"description":1217,"categories":1218,"draft":1139,"year":1219,"series":6},"\u002Fblog\u002Fenums-golang","Implementing Enums in Golang","Enums are a way to defined set of constant values. Learn how to implement enums in Go using iota with examples.",[19,1137],"2021-12-18",{"path":1221,"title":1222,"description":1223,"categories":1224,"draft":1139,"year":1225,"series":6},"\u002Fblog\u002Fenvironment-variable-golang","Guide to Environment variables in Go","Learn what are environment variables and how to use them in Go",[19,1137],"2020-08-14",{"path":1227,"title":1228,"description":1229,"categories":1230,"draft":1139,"year":1231,"series":6},"\u002Fblog\u002Ferror-handling-golang","Handle errors the right way — Golang","How to handle errors in golang to make your life easy",[19,1137],"2020-01-30",{"path":1233,"title":1234,"description":1235,"categories":1236,"draft":1139,"year":1157,"series":1239},"\u002Fblog\u002Ffile-attack-field-guide","How File-Based Attacks Land: A Detection Engineer's Field Guide","A practical taxonomy of how malware and phishing arrive as files, why classic controls miss them, and how detection should think.",[1237,1238],"Security","Systems",{"name":1240,"part":121},"File Attack Deep Dives",{"path":1242,"title":1243,"description":1244,"categories":1245,"draft":1139,"year":1246,"series":6},"\u002Fblog\u002Ffile-upload-golang","Uploading Files in Golang with Multipart Request","Learn how to upload files from your client to server as a multipart request in Golang.",[19,1137],"2021-03-13",{"path":1248,"title":1249,"description":1250,"categories":1251,"draft":1139,"year":1253,"series":6},"\u002Fblog\u002Fgit-branch","Git Branch 101","Branching is a new path of development that makes it a lot easier to build features. Learn why and how to use branching in git.",[1252,1137],"Git","2022-03-20",{"path":1255,"title":1256,"description":1257,"categories":1258,"draft":1139,"year":1259,"series":6},"\u002Fblog\u002Fgit-pull-request-template","Guide to Pull Request Templates","Improve collaboration and code reviews with pull request templates. Blog include PR template and how to create one on github\u002Fgitlab",[1252,1137],"2023-08-24",{"path":1261,"title":1262,"description":1263,"categories":1264,"draft":1139,"year":1265,"series":6},"\u002Fblog\u002Fgit-remove-sensitive-info","Securing Git: Remove Sensitive Information","Protect your code from security breaches by using BFG tool to remove sensitive information from Git history. Learn how to do it in this comprehensive guide.",[1252,1137],"2023-10-16",{"path":1267,"title":1268,"description":1269,"categories":1270,"draft":1139,"year":1271,"series":6},"\u002Fblog\u002Fgit-tags-explained","Git tags : Explained","What Git tags are, why and when to use them, and how to start tagging releases in your own projects.",[1252,1137],"2020-06-18",{"path":1273,"title":1274,"description":1275,"categories":1276,"draft":1139,"year":1277,"series":6},"\u002Fblog\u002Fgo-dependency-injection","Dependency Injection in Go using Wire","Learn about dependency injection, its benefits and how to implement it in Go services using wire",[19,1137],"2022-11-26",{"path":1279,"title":1280,"description":1281,"categories":1282,"draft":1139,"year":1283,"series":6},"\u002Fblog\u002Fgo-generics","Introduction to Generics in Go","Learn about generics in Golang, it's benefits and how to implement it in applications.",[19,1137],"2022-11-27",{"path":1285,"title":1286,"description":1287,"categories":1288,"draft":1139,"year":1289,"series":6},"\u002Fblog\u002Fgo-in-memory-cache","Building In-Memory Cache in Go","Learn about in-memory caching in Golang, it's benefits and how to implement it with and without generics with a TTL(expiry).",[19,1137],"2024-03-28",{"path":1291,"title":1292,"description":1293,"categories":1294,"draft":1139,"year":1295,"series":6},"\u002Fblog\u002Fgo-makefile","Ultimate Makefile for Golang","Boost your productivity and save time with ultimate Makefile for Golang projects.",[19,1137],"2024-06-10",{"path":1297,"title":1298,"description":1299,"categories":1300,"draft":1139,"year":1301,"series":6},"\u002Fblog\u002Fgo-middleware","Mastering Middlewares in Golang","Learn about middlewares, their use cases and how to implement them in Golang applications",[19,1137],"2022-03-13",{"path":1303,"title":1304,"description":1305,"categories":1306,"draft":1139,"year":1308,"series":6},"\u002Fblog\u002Fgo-naming-conventions","Naming Conventions in Golang","Why naming conventions matter in Go, with best practices and practical examples for clear, readable, maintainable code.",[19,1137,1307],"Code Quality","2023-05-19",{"path":1310,"title":1311,"description":1312,"categories":1313,"draft":1139,"year":1315,"series":6},"\u002Fblog\u002Fgo-with-redis","Go with Redis","A practical introduction to using Redis with Golang to make your applications faster with in-memory data storage.",[19,1314,1137],"Database","2020-05-03",{"path":1317,"title":1318,"description":1319,"categories":1320,"draft":1139,"year":1321,"series":6},"\u002Fblog\u002Fgolang-maps","Learn Maps in Golang (with examples)","A complete guide to maps in Golang: creating maps, adding and removing items, iterating, and how map equality works.",[19,1137],"2020-09-10",{"path":1323,"title":1324,"description":1325,"categories":1326,"draft":1139,"year":1327,"series":6},"\u002Fblog\u002Fguide-to-cdn","Guide to Content Delivery Network","CDN is one of the backbone of modern world internet infrastructure. Learn about Content Delivery Network, it's working, types and benefits.",[1186,1137],"2022-01-23",{"path":1329,"title":1330,"description":1331,"categories":1332,"draft":1139,"year":1333,"series":6},"\u002Fblog\u002Fguide-to-rule-engines","Guide to Rule Engines","Rule Engines help in solving changing business requirements with ease. Learn all about Rule engines, it's working, benefits and how to implement one in Golang",[19,1137],"2022-09-12",{"path":1335,"title":1336,"description":1337,"categories":1338,"draft":1139,"year":1339,"series":6},"\u002Fblog\u002Fhexagonal-architecture","Guide to Hexagonal Architecture","Learn how to design efficient application with hexagonal architecture with practical example",[1186,1137],"2020-12-13",{"path":1341,"title":1342,"description":1343,"categories":1344,"draft":1139,"year":1345,"series":6},"\u002Fblog\u002Fhttp-status-codes","Learn HTTP Status Codes","A tour of HTTP response status codes, what each class means, and when to use which code in your applications.",[1178,1137],"2020-07-30",{"path":1145,"title":5,"description":1138,"categories":1347,"draft":1139,"year":1148,"series":6},[19,1137],{"path":1349,"title":1350,"description":1351,"categories":1352,"draft":1139,"year":1353,"series":6},"\u002Fblog\u002Fjson-in-postgres-with-golang","Storing JSON in Postgres with Golang","Learn how to store JSON objects in Postgres and how to implement it in Golang.",[1137,1314,19],"2021-02-13",{"path":1355,"title":1356,"description":1357,"categories":1358,"draft":1139,"year":1359,"series":6},"\u002Fblog\u002Fjson-web-token","Complete Guide to JWT","JSON Web Tokens are a very compact way to carry information. Learn about JWTs in depth, from its structure to when to use it.",[1137,1178],"2021-11-20",{"path":1361,"title":1362,"description":1363,"categories":1364,"draft":1139,"year":1365,"series":6},"\u002Fblog\u002Flearn-to-say-no","Learning to say No","Learn why it's important to say 'NO'. How it helps in increasing productivity and explore strategies for saying No",[1170,1169],"2022-04-09",{"path":1367,"title":1368,"description":1369,"categories":1370,"draft":1139,"year":1371,"series":6},"\u002Fblog\u002Flearn-unlearn-relearn","Learn - Unlearn - Relearn","Unlearning things to learn new is the way to grow. Discover how to do that!",[1156,1170],"2020-09-25",{"path":1373,"title":1374,"description":1375,"categories":1376,"draft":1139,"year":1377,"series":6},"\u002Fblog\u002Flinting-in-golang","Introduction to Linting in Go","Introduction to improving code quality using linting. Learn how to add linting in your Go projects.",[19,1137],"2021-07-07",{"path":1379,"title":1380,"description":1381,"categories":1382,"draft":1139,"year":1383,"series":6},"\u002Fblog\u002Fload-balancing","Load Balancing 101","Complete guide on load balancers explaining the internal working and how does it help in making applications efficient.",[1186,1137],"2021-05-29",{"path":1385,"title":1386,"description":1387,"categories":1388,"draft":1139,"year":1389,"series":6},"\u002Fblog\u002Fmaking-decisions-the-right-way","Making Decisions: The right way","Decisions are hard! Learn how to make the right decisions always",[1156,1170],"2020-06-07",{"path":1391,"title":1392,"description":1393,"categories":1394,"draft":1139,"year":1396,"series":6},"\u002Fblog\u002Fmanage-logs-with-logrotate","Using Logrotate to manage logs","Learn how to use logrotate system utility to manage logs with example",[1395,1137],"Linux","2020-09-08",{"path":1398,"title":1399,"description":1400,"categories":1401,"draft":1139,"year":1402,"series":6},"\u002Fblog\u002Fmarshal-structs-golang","Marshal structs the right way: Golang","Why Golang marshals empty structs into your JSON instead of null, and how to marshal structs the right way.",[19,1137],"2020-03-31",{"path":1404,"title":1405,"description":1406,"categories":1407,"draft":1139,"year":1408,"series":6},"\u002Fblog\u002Fnotes-almanack-naval","Book Notes : Almanack of Naval Ravikant","My notes\u002Fhighlights from Almanack of Naval Ravikant book by Eric Jorgenson",[1169,1170],"2020-10-17",{"path":1410,"title":1411,"description":1412,"categories":1413,"draft":1139,"year":1414,"series":6},"\u002Fblog\u002Fnotes-anything-you-want","Book Notes : Anything you want","My notes\u002Fhighlights from Anything you want book by Derek Sivers",[1169,1170],"2021-09-25",{"path":1416,"title":1417,"description":1418,"categories":1419,"draft":1139,"year":1421,"series":6},"\u002Fblog\u002Fnotes-getting-real","Book Notes : Getting Real","My notes and highlights from Getting Real by Jason Fried and David Heinemeier Hansson on building web applications.",[1169,1420],"Startups","2020-11-03",{"path":1423,"title":1424,"description":1425,"categories":1426,"draft":1139,"year":1427,"series":6},"\u002Fblog\u002Fnotes-hell-yeah-or-no","Book Notes : Hell Yeah or No","My notes\u002Fhighlights from Hell Yeah or No book by Derek Sivers",[1169,1170],"2020-09-16",{"path":1429,"title":1430,"description":1431,"categories":1432,"draft":1139,"year":1433,"series":6},"\u002Fblog\u002Fnotes-how-to-be-a-capitalist","Book Notes : How to Be a Capitalist Without Any Capital","My notes\u002Fhighlights from How to Be a Capitalist Without Any Capital by Nathan Latka",[1169,1420],"2020-01-07",{"path":1435,"title":1436,"description":1437,"categories":1438,"draft":1139,"year":1440,"series":6},"\u002Fblog\u002Fnotes-lean-b2b","Book Notes : Lean B2B","My notes and highlights from Lean B2B by Étienne Garbugli on assessing markets, building MVPs, and selling to businesses.",[1169,1439],"Entrepreneurship","2022-07-02",{"path":1442,"title":1443,"description":1444,"categories":1445,"draft":1139,"year":1447,"series":6},"\u002Fblog\u002Fnotes-lets-talk-money","Book Notes : Let's Talk Money","My notes and highlights from Let's Talk Money by Monica Halan on managing personal finances and savings.",[1169,1446],"Personal Finance","2021-02-26",{"path":1449,"title":1450,"description":1451,"categories":1452,"draft":1139,"year":1453,"series":6},"\u002Fblog\u002Fnotes-obviously-awesome","Book Notes : Obviously Awesome","My notes and highlights from Obviously Awesome by April Dunford on product positioning and marketing strategy.",[1169,1420],"2020-04-26",{"path":1455,"title":1456,"description":1457,"categories":1458,"draft":1139,"year":1460,"series":6},"\u002Fblog\u002Fnotes-refactoring-ui","Book Notes: Refactoring UI","My notes and highlights from Refactoring UI by Adam Wathan and Steve Schoger, full of practical design tips for engineers.",[1169,1459],"Design","2020-05-09",{"path":1462,"title":1463,"description":1464,"categories":1465,"draft":1139,"year":1466,"series":6},"\u002Fblog\u002Fnotes-rework","Book Notes: Rework","My notes and highlights from Rework by Jason Fried and David Heinemeier Hansson on a better way to succeed in business.",[1169,1420],"2021-04-14",{"path":1468,"title":1469,"description":1470,"categories":1471,"draft":1139,"year":1473,"series":6},"\u002Fblog\u002Fone-on-one-meetings","Guide to Effective 1:1 Meetings","One on One meetings are important for your personal & professional growth. Learn how to master 1:1s with your manager and peers.",[1472,1156],"Career","2023-03-05",{"path":1475,"title":1476,"description":1477,"categories":1478,"draft":1139,"year":1479,"series":6},"\u002Fblog\u002Fpersonal-okrs","Personal OKRs for Success","Why one should set personal OKRs and how to achieve success with them",[1156,1170],"2020-06-27",{"path":1481,"title":1482,"description":1483,"categories":1484,"draft":1139,"year":1486,"series":6},"\u002Fblog\u002Fpoker-tips","Poker Tips: Johns Hopkins Poker Class","Notes from Johns Hopkins poker course. This guide will help you improve in Poker and win some large pots.",[1170,1485],"Poker","2020-06-13",{"path":1488,"title":1489,"description":1490,"categories":1491,"draft":1139,"year":1492,"series":6},"\u002Fblog\u002Fpomodoro","Get work done: The Pomo Way","Learn to focus and get productive by following the Pomodoro Technique",[1156],"2020-10-24",{"path":1494,"title":1495,"description":1496,"categories":1497,"draft":1139,"year":1498,"series":6},"\u002Fblog\u002Fpostgres-constraints","Postgres Constraints","Constraints are line of defense for database. Explore various types of constrainsts in postgres",[1314,1137],"2020-11-07",{"path":1500,"title":1501,"description":1502,"categories":1503,"draft":1139,"year":1504,"series":6},"\u002Fblog\u002Fppf-explained","PPF Explained","Learn basics about Public Provident Fund and why you should invest",[1170,1446],"2020-12-24",{"path":1506,"title":1507,"description":1508,"categories":1509,"draft":1139,"year":1510,"series":6},"\u002Fblog\u002Fproductivity-chrome-extensions","Boost Productivity with Chrome Extensions","Utitizing chrome extensions to boost your productivity!",[1156,1179,1178],"2020-04-24",{"path":1512,"title":1513,"description":1514,"categories":1515,"draft":1139,"year":1516,"series":6},"\u002Fblog\u002Fproductivity-in-vscode","Improve your productivity with VS Code","Key VS Code features like the integrated terminal, shortcuts, and extensions that improved my everyday productivity.",[1156,1137],"2020-03-12",{"path":1518,"title":1519,"description":1520,"categories":1521,"draft":1139,"year":1522,"series":6},"\u002Fblog\u002Freading-101","Improving Reading 101","Why reading matters, how to build a reading habit, and what to read next - from my own journey into books.",[1169,1170],"2020-04-04",{"path":1524,"title":1525,"description":1526,"categories":1527,"draft":1139,"year":1528,"series":6},"\u002Fblog\u002Freverse-proxy","Understanding Reverse Proxy","Learn about reverse proxy, how it is different from forward proxy and explore advantages of using it in system design.",[1186,1137],"2021-10-03",{"path":1530,"title":1531,"description":1532,"categories":1533,"draft":1139,"year":1534,"series":6},"\u002Fblog\u002Frunning-periodic-background-task-golang","Running periodic background tasks in Golang","How to run periodic background tasks in Golang by combining cron-style scheduling with background execution.",[19,1137],"2019-11-21",{"path":1536,"title":1537,"description":1538,"categories":1539,"draft":1139,"year":1540,"series":6},"\u002Fblog\u002Fsessions-in-golang","Sessions using Golang and Redis","How cookies and sessions work, and how to implement persistent login sessions in Golang using Redis.",[19,1314,1137],"2020-02-25",{"path":1542,"title":1543,"description":1544,"categories":1545,"draft":1139,"year":1546,"series":6},"\u002Fblog\u002Fsolid-dry-kiss-yagni","Solid Dry Kiss Yagni","An introduction to the SOLID, DRY, KISS, and YAGNI principles and how they help you write cleaner, robust code.",[1193],"2020-07-17",{"path":1548,"title":1549,"description":1550,"categories":1551,"draft":1139,"year":1552,"series":6},"\u002Fblog\u002Fstack-in-golang","Implement Stack in Golang","Learn how to implement stack data structure in Golang (Full code)",[19,1137],"2020-09-14",{"path":1554,"title":1555,"description":1556,"categories":1557,"draft":1139,"year":1558,"series":6},"\u002Fblog\u002Fstart-oss-today","Start your Open Source journey today","Start your OSS journey with intro to GIT. Participate in Hacktoberfest!",[1252,1137],"2020-09-19",{"path":1560,"title":1561,"description":1562,"categories":1563,"draft":1139,"year":1565,"series":6},"\u002Fblog\u002Fsticky-social-bar","Sticky social share component in HTML","Learn how to build a social media sharing component in HTML and add it to your website.",[1137,1564],"Frontend","2021-02-05",{"path":1567,"title":1568,"description":1569,"categories":1570,"draft":1139,"year":1571,"series":6},"\u002Fblog\u002Fterm-insurance","Term insurance Simplified","Everything you need to know before you buy a term insurance.",[1170,1446],"2020-11-29",{"path":1573,"title":1574,"description":1575,"categories":1576,"draft":1139,"year":1578,"series":6},"\u002Fblog\u002Fterminal-output-with-redirection","Handling terminal outputs with Redirection","Learn how to handle terminal outputs with Redirection and saving it to files",[1395,1577,1137],"Terminal","2020-09-06",{"path":1580,"title":1581,"description":1582,"categories":1583,"draft":1139,"year":1584,"series":6},"\u002Fblog\u002Fthink-and-grow-rich","Book Notes: Think and Grow Rich","My notes and highlights from Think and Grow Rich by Napoleon Hill, covering its process for building wealth.",[1169,1170],"2020-05-19",{"path":1586,"title":1587,"description":1588,"categories":1589,"draft":1139,"year":1590,"series":6},"\u002Fblog\u002Ftransactions-postgres-golang","Transactions on Postgres with Golang","Performing Postgres database operations in Golang with GORM, from basic queries to full transaction support.",[19,1314,1137],"2020-03-18",{"path":1592,"title":1593,"description":1594,"categories":1595,"draft":1139,"year":1596,"series":6},"\u002Fblog\u002Fwaitgroups-in-golang","WaitGroups in Golang","Learn about WaitGroups in golang and how to use them to perform concurrent operations without blocking the main thread.",[19,1137],"2022-05-31",{"path":1598,"title":1599,"description":1600,"categories":1601,"draft":1139,"year":1603,"series":6},"\u002Fblog\u002Fwhat-i-use","What I Use: Products and Softwares","List of what I use in my day to day life ranging from terminal, editors, softwares, devices to accessories",[1170,1602],"Tech","2024-06-01",{"path":1605,"title":1606,"description":1607,"categories":1608,"draft":1139,"year":1609,"series":6},"\u002Fblog\u002Fyear-in-review-2020","Year in Review: 2020","It's a wrap! 2020 was a crazy year, See how my year went!",[1170],"2020-12-31",{"path":1611,"title":1612,"description":1613,"categories":1614,"draft":1139,"year":1615,"series":6},"\u002Fblog\u002Fyear-in-review-2021","Year in Review: 2021","It's a wrap! 2021 was a mixed bag, full of ups and downs. Key Goal for 2022: Start now!",[1170],"2021-12-31",1788272170229]