[{"data":1,"prerenderedAt":1743},["ShallowReactive",2],{"blog-enums-golang":3,"blog-all-for-related":1279},{"id":4,"title":5,"author":6,"body":7,"cardAlt":5,"categories":1265,"description":1267,"draft":1268,"extension":1269,"headerImage":1270,"keywords":1271,"meta":1272,"name":1273,"navigation":47,"path":1274,"seo":1275,"series":6,"stem":1276,"updated":6,"year":1277,"__hash__":1278},"blog\u002Fblog\u002Fenums-golang.md","Implementing Enums in Golang",null,{"type":8,"value":9,"toc":1254},"minimark",[10,23,83,1250],[11,12,13,14,18,19,22],"p",{},"An ",[15,16,17],"strong",{},"enum"," (aka ",[15,20,21],{},"enumerator",") is a data type consisting of a set of named constant values. Enums are a powerful feature with a wide range of uses. Go doesn't support enums natively. There are ways to define enums a bit differently compared to other programming languages like Java. A very simple example of enum can be the 4 directions.",[24,25,30],"pre",{"className":26,"code":27,"language":28,"meta":29,"style":29},"language-markdown shiki shiki-themes github-light github-dark","enum Direction would have 4 values:\n\n- North\n- West\n- South\n- East\n","markdown","",[31,32,33,42,49,59,67,75],"code",{"__ignoreMap":29},[34,35,38],"span",{"class":36,"line":37},"line",1,[34,39,41],{"class":40},"sVt8B","enum Direction would have 4 values:\n",[34,43,45],{"class":36,"line":44},2,[34,46,48],{"emptyLinePlaceholder":47},true,"\n",[34,50,52,56],{"class":36,"line":51},3,[34,53,55],{"class":54},"s4XuR","-",[34,57,58],{"class":40}," North\n",[34,60,62,64],{"class":36,"line":61},4,[34,63,55],{"class":54},[34,65,66],{"class":40}," West\n",[34,68,70,72],{"class":36,"line":69},5,[34,71,55],{"class":54},[34,73,74],{"class":40}," South\n",[34,76,78,80],{"class":36,"line":77},6,[34,79,55],{"class":54},[34,81,82],{"class":40}," East\n",[84,85,86,91,98,197,202,205,209,230,284,299,603,609,672,675,679,1138,1140,1144,1159,1163,1186,1190,1213,1231,1233,1236,1245],"ads",{},[87,88,90],"h2",{"id":89},"define-enums-in-go","Define Enums In Go",[11,92,93,94,97],{},"Let's try to understand enum with an example. An enum for ",[31,95,96],{},"CardSuit"," has 4 possible values and it can be defined as:",[24,99,103],{"className":100,"code":101,"language":102,"meta":29,"style":29},"language-go shiki shiki-themes github-light github-dark","\u002F\u002F Way to implement enum\ntype CardSuit int\n\nconst (\n  Spades  CardSuit = 0\n    Diamond CardSuit = 1\n    Heart   CardSuit = 2\n    Club    CardSuit = 3\n)\n","go",[31,104,105,111,124,128,136,151,163,177,191],{"__ignoreMap":29},[34,106,107],{"class":36,"line":37},[34,108,110],{"class":109},"sJ8bj","\u002F\u002F Way to implement enum\n",[34,112,113,117,121],{"class":36,"line":44},[34,114,116],{"class":115},"szBVR","type",[34,118,120],{"class":119},"sScJk"," CardSuit",[34,122,123],{"class":115}," int\n",[34,125,126],{"class":36,"line":51},[34,127,48],{"emptyLinePlaceholder":47},[34,129,130,133],{"class":36,"line":61},[34,131,132],{"class":115},"const",[34,134,135],{"class":40}," (\n",[34,137,138,142,145,148],{"class":36,"line":69},[34,139,141],{"class":140},"sj4cs","  Spades",[34,143,144],{"class":119},"  CardSuit",[34,146,147],{"class":115}," =",[34,149,150],{"class":140}," 0\n",[34,152,153,156,158,160],{"class":36,"line":77},[34,154,155],{"class":140},"    Diamond",[34,157,120],{"class":119},[34,159,147],{"class":115},[34,161,162],{"class":140}," 1\n",[34,164,166,169,172,174],{"class":36,"line":165},7,[34,167,168],{"class":140},"    Heart",[34,170,171],{"class":119},"   CardSuit",[34,173,147],{"class":115},[34,175,176],{"class":140}," 2\n",[34,178,180,183,186,188],{"class":36,"line":179},8,[34,181,182],{"class":140},"    Club",[34,184,185],{"class":119},"    CardSuit",[34,187,147],{"class":115},[34,189,190],{"class":140}," 3\n",[34,192,194],{"class":36,"line":193},9,[34,195,196],{"class":40},")\n",[198,199,201],"h3",{"id":200},"problem","Problem",[11,203,204],{},"What if the set of values that you want to be a part of enum is big? It's not feasible to manually maintain numbers. Another problem with this approach is handling the enum numeric values explicitly when you remove one or more values.",[198,206,208],{"id":207},"solution-using-iota","Solution: Using iota",[11,210,211,212,215,216,218,219,221,222,229],{},"To solve the problem above, Golang provides us with a keyword ",[31,213,214],{},"iota"," that is a built-in, predeclared identifier that represents successive untyped integer constants. The ",[31,217,214],{}," starts from zero and auto-increments as more values are added. Once you've defined ",[31,220,214],{}," in your constant, it is not required with further values. You can read more about iota ",[223,224,228],"a",{"href":225,"rel":226},"https:\u002F\u002Fgo.dev\u002Fref\u002Fspec#Iota",[227],"nofollow","here",".",[24,231,233],{"className":100,"code":232,"language":102,"meta":29,"style":29},"type CardSuit int\n\nconst (\n    Spades CardSuit = iota\n    Diamond\n    Heart\n    Club\n)\n",[31,234,235,243,247,253,265,270,275,280],{"__ignoreMap":29},[34,236,237,239,241],{"class":36,"line":37},[34,238,116],{"class":115},[34,240,120],{"class":119},[34,242,123],{"class":115},[34,244,245],{"class":36,"line":44},[34,246,48],{"emptyLinePlaceholder":47},[34,248,249,251],{"class":36,"line":51},[34,250,132],{"class":115},[34,252,135],{"class":40},[34,254,255,258,260,262],{"class":36,"line":61},[34,256,257],{"class":140},"    Spades",[34,259,120],{"class":119},[34,261,147],{"class":115},[34,263,264],{"class":140}," iota\n",[34,266,267],{"class":36,"line":69},[34,268,269],{"class":140},"    Diamond\n",[34,271,272],{"class":36,"line":77},[34,273,274],{"class":140},"    Heart\n",[34,276,277],{"class":36,"line":165},[34,278,279],{"class":140},"    Club\n",[34,281,282],{"class":36,"line":179},[34,283,196],{"class":40},[11,285,286,287,290,291,294,295,298],{},"This works exactly as before but now you can remove or extend your enum without updates through out your code. But you must have notices that we have defined Weekday as int but what if we need a float or a string value for each enum type. We can always define a ",[31,288,289],{},"Float"," or ",[31,292,293],{},"String"," to solve this. Let's add a method to return string values for our ",[31,296,297],{},"Weekday"," enum.",[24,300,302],{"className":100,"code":301,"language":102,"meta":29,"style":29},"package main\n\nimport \"fmt\"\n\ntype CardSuit int\n\nconst (\n    Spades CardSuit = iota\n    Diamond\n    Heart\n    Club\n)\n\n\u002F\u002F returns corresponding string value to the CardSuit enum\nfunc (c CardSuit) String() string {\n    switch c {\n    case Spades:\n        return \"Spades ♤\"\n    case Diamond:\n        return \"Diamond ♢\"\n    case Heart:\n        return \"Heart ♥\"\n    case Club:\n        return \"Club ♧\"\n    }\n    return \"Unknown card suit\"\n}\n\nfunc main() {\n    \u002F\u002F define day of type CardSuit (enum)\n    var suit CardSuit\n    \u002F\u002F initializing the day\n    suit = Heart\n    fmt.Printf(\"Suit is %s\", suit.String())\n}\n",[31,303,304,312,316,331,335,343,347,353,363,367,372,377,382,387,393,421,430,439,448,456,464,472,480,488,496,502,511,517,522,533,539,551,557,569,598],{"__ignoreMap":29},[34,305,306,309],{"class":36,"line":37},[34,307,308],{"class":115},"package",[34,310,311],{"class":119}," main\n",[34,313,314],{"class":36,"line":44},[34,315,48],{"emptyLinePlaceholder":47},[34,317,318,321,325,328],{"class":36,"line":51},[34,319,320],{"class":115},"import",[34,322,324],{"class":323},"sZZnC"," \"",[34,326,327],{"class":119},"fmt",[34,329,330],{"class":323},"\"\n",[34,332,333],{"class":36,"line":61},[34,334,48],{"emptyLinePlaceholder":47},[34,336,337,339,341],{"class":36,"line":69},[34,338,116],{"class":115},[34,340,120],{"class":119},[34,342,123],{"class":115},[34,344,345],{"class":36,"line":77},[34,346,48],{"emptyLinePlaceholder":47},[34,348,349,351],{"class":36,"line":165},[34,350,132],{"class":115},[34,352,135],{"class":40},[34,354,355,357,359,361],{"class":36,"line":179},[34,356,257],{"class":140},[34,358,120],{"class":119},[34,360,147],{"class":115},[34,362,264],{"class":140},[34,364,365],{"class":36,"line":193},[34,366,269],{"class":140},[34,368,370],{"class":36,"line":369},10,[34,371,274],{"class":140},[34,373,375],{"class":36,"line":374},11,[34,376,279],{"class":140},[34,378,380],{"class":36,"line":379},12,[34,381,196],{"class":40},[34,383,385],{"class":36,"line":384},13,[34,386,48],{"emptyLinePlaceholder":47},[34,388,390],{"class":36,"line":389},14,[34,391,392],{"class":109},"\u002F\u002F returns corresponding string value to the CardSuit enum\n",[34,394,396,399,402,405,407,410,412,415,418],{"class":36,"line":395},15,[34,397,398],{"class":115},"func",[34,400,401],{"class":40}," (",[34,403,404],{"class":54},"c ",[34,406,96],{"class":119},[34,408,409],{"class":40},") ",[34,411,293],{"class":119},[34,413,414],{"class":40},"() ",[34,416,417],{"class":115},"string",[34,419,420],{"class":40}," {\n",[34,422,424,427],{"class":36,"line":423},16,[34,425,426],{"class":115},"    switch",[34,428,429],{"class":40}," c {\n",[34,431,433,436],{"class":36,"line":432},17,[34,434,435],{"class":115},"    case",[34,437,438],{"class":40}," Spades:\n",[34,440,442,445],{"class":36,"line":441},18,[34,443,444],{"class":115},"        return",[34,446,447],{"class":323}," \"Spades ♤\"\n",[34,449,451,453],{"class":36,"line":450},19,[34,452,435],{"class":115},[34,454,455],{"class":40}," Diamond:\n",[34,457,459,461],{"class":36,"line":458},20,[34,460,444],{"class":115},[34,462,463],{"class":323}," \"Diamond ♢\"\n",[34,465,467,469],{"class":36,"line":466},21,[34,468,435],{"class":115},[34,470,471],{"class":40}," Heart:\n",[34,473,475,477],{"class":36,"line":474},22,[34,476,444],{"class":115},[34,478,479],{"class":323}," \"Heart ♥\"\n",[34,481,483,485],{"class":36,"line":482},23,[34,484,435],{"class":115},[34,486,487],{"class":40}," Club:\n",[34,489,491,493],{"class":36,"line":490},24,[34,492,444],{"class":115},[34,494,495],{"class":323}," \"Club ♧\"\n",[34,497,499],{"class":36,"line":498},25,[34,500,501],{"class":40},"    }\n",[34,503,505,508],{"class":36,"line":504},26,[34,506,507],{"class":115},"    return",[34,509,510],{"class":323}," \"Unknown card suit\"\n",[34,512,514],{"class":36,"line":513},27,[34,515,516],{"class":40},"}\n",[34,518,520],{"class":36,"line":519},28,[34,521,48],{"emptyLinePlaceholder":47},[34,523,525,527,530],{"class":36,"line":524},29,[34,526,398],{"class":115},[34,528,529],{"class":119}," main",[34,531,532],{"class":40},"() {\n",[34,534,536],{"class":36,"line":535},30,[34,537,538],{"class":109},"    \u002F\u002F define day of type CardSuit (enum)\n",[34,540,542,545,548],{"class":36,"line":541},31,[34,543,544],{"class":115},"    var",[34,546,547],{"class":40}," suit ",[34,549,550],{"class":119},"CardSuit\n",[34,552,554],{"class":36,"line":553},32,[34,555,556],{"class":109},"    \u002F\u002F initializing the day\n",[34,558,560,563,566],{"class":36,"line":559},33,[34,561,562],{"class":40},"    suit ",[34,564,565],{"class":115},"=",[34,567,568],{"class":40}," Heart\n",[34,570,572,575,578,581,584,587,590,593,595],{"class":36,"line":571},34,[34,573,574],{"class":40},"    fmt.",[34,576,577],{"class":119},"Printf",[34,579,580],{"class":40},"(",[34,582,583],{"class":323},"\"Suit is ",[34,585,586],{"class":140},"%s",[34,588,589],{"class":323},"\"",[34,591,592],{"class":40},", suit.",[34,594,293],{"class":119},[34,596,597],{"class":40},"())\n",[34,599,601],{"class":36,"line":600},35,[34,602,516],{"class":40},[11,604,605,606,608],{},"In the above case, switch case seems to be a lot of work. Since we have ",[31,607,214],{}," as index we could use a string slice directly.",[24,610,612],{"className":100,"code":611,"language":102,"meta":29,"style":29},"func (c CardSuit) String() string {\n    return []string{\"Spades\", \"Diamond\", \"Heart\", \"Club\"}[c]\n}\n",[31,613,614,634,668],{"__ignoreMap":29},[34,615,616,618,620,622,624,626,628,630,632],{"class":36,"line":37},[34,617,398],{"class":115},[34,619,401],{"class":40},[34,621,404],{"class":54},[34,623,96],{"class":119},[34,625,409],{"class":40},[34,627,293],{"class":119},[34,629,414],{"class":40},[34,631,417],{"class":115},[34,633,420],{"class":40},[34,635,636,638,641,643,646,649,652,655,657,660,662,665],{"class":36,"line":44},[34,637,507],{"class":115},[34,639,640],{"class":40}," []",[34,642,417],{"class":115},[34,644,645],{"class":40},"{",[34,647,648],{"class":323},"\"Spades\"",[34,650,651],{"class":40},", ",[34,653,654],{"class":323},"\"Diamond\"",[34,656,651],{"class":40},[34,658,659],{"class":323},"\"Heart\"",[34,661,651],{"class":40},[34,663,664],{"class":323},"\"Club\"",[34,666,667],{"class":40},"}[c]\n",[34,669,670],{"class":36,"line":51},[34,671,516],{"class":40},[673,674],"hr",{},[87,676,678],{"id":677},"points-to-remember","Points to Remember",[680,681,682,729,796,863],"ul",{},[683,684,685,686],"li",{},"You can use enum to include default\u002Funknown values in enum as well and handle them in further implementation.",[24,687,689],{"className":100,"code":688,"language":102,"meta":29,"style":29},"const (\n    Unknown CardSuit = iota\n  Spades\n    Diamond\n    Heart\n    Club\n)\n",[31,690,691,697,708,713,717,721,725],{"__ignoreMap":29},[34,692,693,695],{"class":36,"line":37},[34,694,132],{"class":115},[34,696,135],{"class":40},[34,698,699,702,704,706],{"class":36,"line":44},[34,700,701],{"class":140},"    Unknown",[34,703,120],{"class":119},[34,705,147],{"class":115},[34,707,264],{"class":140},[34,709,710],{"class":36,"line":51},[34,711,712],{"class":140},"  Spades\n",[34,714,715],{"class":36,"line":61},[34,716,269],{"class":140},[34,718,719],{"class":36,"line":69},[34,720,274],{"class":140},[34,722,723],{"class":36,"line":77},[34,724,279],{"class":140},[34,726,727],{"class":36,"line":165},[34,728,196],{"class":40},[683,730,731,732,734,735,229,738],{},"Using ",[31,733,214],{}," some values can be skipped when defining enum types. In the example enum below, there is no value defined for value ",[31,736,737],{},"2",[24,739,741],{"className":100,"code":740,"language":102,"meta":29,"style":29},"type Vehicle int\n\nconst(\n  Car Vehicle = iota\n  Bike\n  _\n  Truck\n  Ship\n)\n",[31,742,743,752,756,763,772,777,782,787,792],{"__ignoreMap":29},[34,744,745,747,750],{"class":36,"line":37},[34,746,116],{"class":115},[34,748,749],{"class":119}," Vehicle",[34,751,123],{"class":115},[34,753,754],{"class":36,"line":44},[34,755,48],{"emptyLinePlaceholder":47},[34,757,758,760],{"class":36,"line":51},[34,759,132],{"class":115},[34,761,762],{"class":40},"(\n",[34,764,765,768,770],{"class":36,"line":61},[34,766,767],{"class":40},"  Car Vehicle ",[34,769,565],{"class":115},[34,771,264],{"class":140},[34,773,774],{"class":36,"line":69},[34,775,776],{"class":40},"  Bike\n",[34,778,779],{"class":36,"line":77},[34,780,781],{"class":40},"  _\n",[34,783,784],{"class":36,"line":165},[34,785,786],{"class":40},"  Truck\n",[34,788,789],{"class":36,"line":179},[34,790,791],{"class":40},"  Ship\n",[34,793,794],{"class":36,"line":193},[34,795,196],{"class":40},[683,797,798,799],{},"Another usecase could be to have different increment counter instead of 1.",[24,800,802],{"className":100,"code":801,"language":102,"meta":29,"style":29},"const (\n    Success = iota        \u002F\u002F iota = 0 initially\n    Fail = iota + 2       \u002F\u002F iota = 1 so 1 + 2 = 3\n    Pending = iota * 5    \u002F\u002F iota = 2 so 2 * 5 = 10\n)\n",[31,803,804,810,823,841,859],{"__ignoreMap":29},[34,805,806,808],{"class":36,"line":37},[34,807,132],{"class":115},[34,809,135],{"class":40},[34,811,812,815,817,820],{"class":36,"line":44},[34,813,814],{"class":140},"    Success",[34,816,147],{"class":115},[34,818,819],{"class":140}," iota",[34,821,822],{"class":109},"        \u002F\u002F iota = 0 initially\n",[34,824,825,828,830,832,835,838],{"class":36,"line":51},[34,826,827],{"class":140},"    Fail",[34,829,147],{"class":115},[34,831,819],{"class":140},[34,833,834],{"class":115}," +",[34,836,837],{"class":140}," 2",[34,839,840],{"class":109},"       \u002F\u002F iota = 1 so 1 + 2 = 3\n",[34,842,843,846,848,850,853,856],{"class":36,"line":61},[34,844,845],{"class":140},"    Pending",[34,847,147],{"class":115},[34,849,819],{"class":140},[34,851,852],{"class":115}," *",[34,854,855],{"class":140}," 5",[34,857,858],{"class":109},"    \u002F\u002F iota = 2 so 2 * 5 = 10\n",[34,860,861],{"class":36,"line":69},[34,862,196],{"class":40},[683,864,865,866,290,869,871,872],{},"Instead of defining enums as ",[31,867,868],{},"int",[31,870,417],{},", they can be defined as structs. An example for struct based enum in Go would look like this:",[24,873,875],{"className":100,"code":874,"language":102,"meta":29,"style":29},"type Vehicle struct {\n    name   string\n    wheels int\n}\n\nfunc (v Vehicle) String() string {\n    return v.name\n}\n\nfunc (v Vehicle) Wheels() int {\n    return v.wheels\n}\n\nvar (\n    Unknown = Vehicle{\"\", 0}\n    Car     = Vehicle{\"car\", 4}\n    Bike    = Vehicle{\"bike\", 2}\n    Ship    = Vehicle{\"ship\", 0}\n)\n\nfunc main() {\n    car := Car\n    fmt.Printf(\"Wheels in %s: %v\", car.String(), car.Wheels())\n}\n",[31,876,877,888,896,904,908,912,934,941,945,949,970,977,981,985,992,1013,1034,1054,1074,1078,1082,1090,1101,1134],{"__ignoreMap":29},[34,878,879,881,883,886],{"class":36,"line":37},[34,880,116],{"class":115},[34,882,749],{"class":119},[34,884,885],{"class":115}," struct",[34,887,420],{"class":40},[34,889,890,893],{"class":36,"line":44},[34,891,892],{"class":40},"    name   ",[34,894,895],{"class":115},"string\n",[34,897,898,901],{"class":36,"line":51},[34,899,900],{"class":40},"    wheels ",[34,902,903],{"class":115},"int\n",[34,905,906],{"class":36,"line":61},[34,907,516],{"class":40},[34,909,910],{"class":36,"line":69},[34,911,48],{"emptyLinePlaceholder":47},[34,913,914,916,918,921,924,926,928,930,932],{"class":36,"line":77},[34,915,398],{"class":115},[34,917,401],{"class":40},[34,919,920],{"class":54},"v ",[34,922,923],{"class":119},"Vehicle",[34,925,409],{"class":40},[34,927,293],{"class":119},[34,929,414],{"class":40},[34,931,417],{"class":115},[34,933,420],{"class":40},[34,935,936,938],{"class":36,"line":165},[34,937,507],{"class":115},[34,939,940],{"class":40}," v.name\n",[34,942,943],{"class":36,"line":179},[34,944,516],{"class":40},[34,946,947],{"class":36,"line":193},[34,948,48],{"emptyLinePlaceholder":47},[34,950,951,953,955,957,959,961,964,966,968],{"class":36,"line":369},[34,952,398],{"class":115},[34,954,401],{"class":40},[34,956,920],{"class":54},[34,958,923],{"class":119},[34,960,409],{"class":40},[34,962,963],{"class":119},"Wheels",[34,965,414],{"class":40},[34,967,868],{"class":115},[34,969,420],{"class":40},[34,971,972,974],{"class":36,"line":374},[34,973,507],{"class":115},[34,975,976],{"class":40}," v.wheels\n",[34,978,979],{"class":36,"line":379},[34,980,516],{"class":40},[34,982,983],{"class":36,"line":384},[34,984,48],{"emptyLinePlaceholder":47},[34,986,987,990],{"class":36,"line":389},[34,988,989],{"class":115},"var",[34,991,135],{"class":40},[34,993,994,997,999,1001,1003,1006,1008,1011],{"class":36,"line":395},[34,995,996],{"class":40},"    Unknown ",[34,998,565],{"class":115},[34,1000,749],{"class":119},[34,1002,645],{"class":40},[34,1004,1005],{"class":323},"\"\"",[34,1007,651],{"class":40},[34,1009,1010],{"class":140},"0",[34,1012,516],{"class":40},[34,1014,1015,1018,1020,1022,1024,1027,1029,1032],{"class":36,"line":423},[34,1016,1017],{"class":40},"    Car     ",[34,1019,565],{"class":115},[34,1021,749],{"class":119},[34,1023,645],{"class":40},[34,1025,1026],{"class":323},"\"car\"",[34,1028,651],{"class":40},[34,1030,1031],{"class":140},"4",[34,1033,516],{"class":40},[34,1035,1036,1039,1041,1043,1045,1048,1050,1052],{"class":36,"line":432},[34,1037,1038],{"class":40},"    Bike    ",[34,1040,565],{"class":115},[34,1042,749],{"class":119},[34,1044,645],{"class":40},[34,1046,1047],{"class":323},"\"bike\"",[34,1049,651],{"class":40},[34,1051,737],{"class":140},[34,1053,516],{"class":40},[34,1055,1056,1059,1061,1063,1065,1068,1070,1072],{"class":36,"line":441},[34,1057,1058],{"class":40},"    Ship    ",[34,1060,565],{"class":115},[34,1062,749],{"class":119},[34,1064,645],{"class":40},[34,1066,1067],{"class":323},"\"ship\"",[34,1069,651],{"class":40},[34,1071,1010],{"class":140},[34,1073,516],{"class":40},[34,1075,1076],{"class":36,"line":450},[34,1077,196],{"class":40},[34,1079,1080],{"class":36,"line":458},[34,1081,48],{"emptyLinePlaceholder":47},[34,1083,1084,1086,1088],{"class":36,"line":466},[34,1085,398],{"class":115},[34,1087,529],{"class":119},[34,1089,532],{"class":40},[34,1091,1092,1095,1098],{"class":36,"line":474},[34,1093,1094],{"class":40},"    car ",[34,1096,1097],{"class":115},":=",[34,1099,1100],{"class":40}," Car\n",[34,1102,1103,1105,1107,1109,1112,1114,1117,1120,1122,1125,1127,1130,1132],{"class":36,"line":482},[34,1104,574],{"class":40},[34,1106,577],{"class":119},[34,1108,580],{"class":40},[34,1110,1111],{"class":323},"\"Wheels in ",[34,1113,586],{"class":140},[34,1115,1116],{"class":323},": ",[34,1118,1119],{"class":140},"%v",[34,1121,589],{"class":323},[34,1123,1124],{"class":40},", car.",[34,1126,293],{"class":119},[34,1128,1129],{"class":40},"(), car.",[34,1131,963],{"class":119},[34,1133,597],{"class":40},[34,1135,1136],{"class":36,"line":490},[34,1137,516],{"class":40},[673,1139],{},[87,1141,1143],{"id":1142},"resources","Resources",[680,1145,1146,1152],{},[683,1147,1148],{},[223,1149,1151],{"href":225,"rel":1150},[227],"Iota in Go",[683,1153,1154],{},[223,1155,1158],{"href":1156,"rel":1157},"https:\u002F\u002Fgithub.com\u002Fabice\u002Fgo-enum",[227],"Golang Enum generator",[198,1160,1162],{"id":1161},"popular-go-articles-you-make-like","Popular Go Articles you make like",[680,1164,1165,1172,1179],{},[683,1166,1167],{},[223,1168,1171],{"href":1169,"rel":1170},"https:\u002F\u002Fwww.mohitkhare.com\u002Fblog\u002Fintroduction-to-goroutines",[227],"Introduction to Goroutines",[683,1173,1174],{},[223,1175,1178],{"href":1176,"rel":1177},"https:\u002F\u002Fwww.mohitkhare.com\u002Fblog\u002Fenvironment-variable-golang\u002F",[227],"Environment Variables in Go",[683,1180,1181],{},[223,1182,1185],{"href":1183,"rel":1184},"https:\u002F\u002Fwww.mohitkhare.com\u002Fblog\u002Fmarshal-structs-golang",[227],"Marshal structs the right way",[198,1187,1189],{"id":1188},"books-to-learn-golang","Books to learn Golang",[680,1191,1192,1199,1206],{},[683,1193,1194],{},[223,1195,1198],{"href":1196,"rel":1197},"https:\u002F\u002Famzn.to\u002F3fYLCqz",[227],"Go Programming Language",[683,1200,1201],{},[223,1202,1205],{"href":1203,"rel":1204},"https:\u002F\u002Famzn.to\u002F3s7fWS3",[227],"Learning Go",[683,1207,1208],{},[223,1209,1212],{"href":1210,"rel":1211},"https:\u002F\u002Famzn.to\u002F3t6PM37",[227],"Go in Action",[1214,1215,1216],"blockquote",{},[11,1217,1218,1219,1224,1225,1230],{},"Do explore articles on ",[223,1220,1223],{"href":1221,"rel":1222},"https:\u002F\u002Fwww.mohitkhare.com\u002Fcategories\u002Fgolang",[227],"Golang"," and ",[223,1226,1229],{"href":1227,"rel":1228},"https:\u002F\u002Fwww.mohitkhare.com\u002Fcategories\u002Fsystem%20design",[227],"System Design",". You'll learn something new 💡",[673,1232],{},[11,1234,1235],{},"I hope you learned something new. Feel free to suggest improvements ✔️",[11,1237,1238,1239,1244],{},"I share regular updates and resources on ",[223,1240,1243],{"href":1241,"rel":1242},"https:\u002F\u002Ftwitter.com\u002Fmkfeuhrer",[227],"Twitter",". Let’s connect!",[11,1246,1247],{},[15,1248,1249],{},"Keep exploring 🔎 Keep learning 🚀",[1251,1252,1253],"style",{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}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 .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}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 .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}",{"title":29,"searchDepth":44,"depth":44,"links":1255},[1256,1260,1261],{"id":89,"depth":44,"text":90,"children":1257},[1258,1259],{"id":200,"depth":51,"text":201},{"id":207,"depth":51,"text":208},{"id":677,"depth":44,"text":678},{"id":1142,"depth":44,"text":1143,"children":1262},[1263,1264],{"id":1161,"depth":51,"text":1162},{"id":1188,"depth":51,"text":1189},[1223,1266],"Programming","Enums are a way to defined set of constant values. Learn how to implement enums in Go using iota with examples.",false,"md","blog\u002Fenums-golang\u002Fenums-golang-card.webp","golang enums, enums in golang, golang enum string",{},"enums-golang","\u002Fblog\u002Fenums-golang",{"title":5,"description":1267},"blog\u002Fenums-golang","2021-12-18","nkMIz7a-pC-wo0XZz6wWm9XLgt0EiqTQbqEEWQaFF98",[1280,1287,1293,1301,1310,1316,1323,1330,1336,1342,1344,1350,1356,1365,1371,1378,1384,1390,1396,1402,1408,1414,1420,1426,1433,1440,1446,1452,1458,1464,1470,1475,1481,1487,1493,1499,1505,1511,1517,1524,1530,1536,1542,1549,1555,1561,1568,1575,1581,1588,1594,1601,1607,1614,1620,1626,1632,1638,1644,1650,1656,1662,1668,1674,1680,1686,1693,1699,1706,1712,1718,1724,1731,1737],{"path":1281,"title":1282,"description":1283,"categories":1284,"draft":47,"year":1286,"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.",[1285,1266],"Productivity","2026-08-26",{"path":1288,"title":1289,"description":1290,"categories":1291,"draft":1268,"year":1292,"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",[1223,1266],"2020-01-12",{"path":1294,"title":1295,"description":1296,"categories":1297,"draft":1268,"year":1300,"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.",[1298,1299],"Books","Life","2021-12-26",{"path":1302,"title":1303,"description":1304,"categories":1305,"draft":1268,"year":1309,"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.",[1306,1307,1308],"Side Projects","Web","Tools","2020-05-26",{"path":1311,"title":1312,"description":1313,"categories":1314,"draft":1268,"year":1315,"series":6},"\u002Fblog\u002Fcap-theorem","CAP Theorem Explained","Learn the concept and misconceptions around popular CAP theorem in system design.",[1229,1266],"2021-07-26",{"path":1317,"title":1318,"description":1319,"categories":1320,"draft":1268,"year":1322,"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.",[1321],"Engineering Principles","2020-07-20",{"path":1324,"title":1325,"description":1326,"categories":1327,"draft":1268,"year":1329,"series":6},"\u002Fblog\u002Fdark-mode","Add Dark mode to websites","Dark mode is ❤️️ Add it to your websites with little CSS and JS",[1328,1307],"Javascript","2020-07-04",{"path":1331,"title":1332,"description":1333,"categories":1334,"draft":1268,"year":1335,"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.",[1223,1266],"2020-10-09",{"path":1337,"title":1338,"description":1339,"categories":1340,"draft":1268,"year":1341,"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.",[1223,1266],"2021-05-05",{"path":1274,"title":5,"description":1267,"categories":1343,"draft":1268,"year":1277,"series":6},[1223,1266],{"path":1345,"title":1346,"description":1347,"categories":1348,"draft":1268,"year":1349,"series":6},"\u002Fblog\u002Fenvironment-variable-golang","Guide to Environment variables in Go","Learn what are environment variables and how to use them in Go",[1223,1266],"2020-08-14",{"path":1351,"title":1352,"description":1353,"categories":1354,"draft":1268,"year":1355,"series":6},"\u002Fblog\u002Ferror-handling-golang","Handle errors the right way — Golang","How to handle errors in golang to make your life easy",[1223,1266],"2020-01-30",{"path":1357,"title":1358,"description":1359,"categories":1360,"draft":1268,"year":1286,"series":1363},"\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.",[1361,1362],"Security","Systems",{"name":1364,"part":37},"File Attack Deep Dives",{"path":1366,"title":1367,"description":1368,"categories":1369,"draft":1268,"year":1370,"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.",[1223,1266],"2021-03-13",{"path":1372,"title":1373,"description":1374,"categories":1375,"draft":1268,"year":1377,"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.",[1376,1266],"Git","2022-03-20",{"path":1379,"title":1380,"description":1381,"categories":1382,"draft":1268,"year":1383,"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",[1376,1266],"2023-08-24",{"path":1385,"title":1386,"description":1387,"categories":1388,"draft":1268,"year":1389,"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.",[1376,1266],"2023-10-16",{"path":1391,"title":1392,"description":1393,"categories":1394,"draft":1268,"year":1395,"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.",[1376,1266],"2020-06-18",{"path":1397,"title":1398,"description":1399,"categories":1400,"draft":1268,"year":1401,"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",[1223,1266],"2022-11-26",{"path":1403,"title":1404,"description":1405,"categories":1406,"draft":1268,"year":1407,"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.",[1223,1266],"2022-11-27",{"path":1409,"title":1410,"description":1411,"categories":1412,"draft":1268,"year":1413,"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).",[1223,1266],"2024-03-28",{"path":1415,"title":1416,"description":1417,"categories":1418,"draft":1268,"year":1419,"series":6},"\u002Fblog\u002Fgo-makefile","Ultimate Makefile for Golang","Boost your productivity and save time with ultimate Makefile for Golang projects.",[1223,1266],"2024-06-10",{"path":1421,"title":1422,"description":1423,"categories":1424,"draft":1268,"year":1425,"series":6},"\u002Fblog\u002Fgo-middleware","Mastering Middlewares in Golang","Learn about middlewares, their use cases and how to implement them in Golang applications",[1223,1266],"2022-03-13",{"path":1427,"title":1428,"description":1429,"categories":1430,"draft":1268,"year":1432,"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.",[1223,1266,1431],"Code Quality","2023-05-19",{"path":1434,"title":1435,"description":1436,"categories":1437,"draft":1268,"year":1439,"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.",[1223,1438,1266],"Database","2020-05-03",{"path":1441,"title":1442,"description":1443,"categories":1444,"draft":1268,"year":1445,"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.",[1223,1266],"2020-09-10",{"path":1447,"title":1448,"description":1449,"categories":1450,"draft":1268,"year":1451,"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.",[1229,1266],"2022-01-23",{"path":1453,"title":1454,"description":1455,"categories":1456,"draft":1268,"year":1457,"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",[1223,1266],"2022-09-12",{"path":1459,"title":1460,"description":1461,"categories":1462,"draft":1268,"year":1463,"series":6},"\u002Fblog\u002Fhexagonal-architecture","Guide to Hexagonal Architecture","Learn how to design efficient application with hexagonal architecture with practical example",[1229,1266],"2020-12-13",{"path":1465,"title":1466,"description":1467,"categories":1468,"draft":1268,"year":1469,"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.",[1307,1266],"2020-07-30",{"path":1471,"title":1171,"description":1472,"categories":1473,"draft":1268,"year":1474,"series":6},"\u002Fblog\u002Fintroduction-to-goroutines","Understand the basics of concurrency and learn how to work with Goroutines in golang.",[1223,1266],"2021-04-10",{"path":1476,"title":1477,"description":1478,"categories":1479,"draft":1268,"year":1480,"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.",[1266,1438,1223],"2021-02-13",{"path":1482,"title":1483,"description":1484,"categories":1485,"draft":1268,"year":1486,"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.",[1266,1307],"2021-11-20",{"path":1488,"title":1489,"description":1490,"categories":1491,"draft":1268,"year":1492,"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",[1299,1298],"2022-04-09",{"path":1494,"title":1495,"description":1496,"categories":1497,"draft":1268,"year":1498,"series":6},"\u002Fblog\u002Flearn-unlearn-relearn","Learn - Unlearn - Relearn","Unlearning things to learn new is the way to grow. Discover how to do that!",[1285,1299],"2020-09-25",{"path":1500,"title":1501,"description":1502,"categories":1503,"draft":1268,"year":1504,"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.",[1223,1266],"2021-07-07",{"path":1506,"title":1507,"description":1508,"categories":1509,"draft":1268,"year":1510,"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.",[1229,1266],"2021-05-29",{"path":1512,"title":1513,"description":1514,"categories":1515,"draft":1268,"year":1516,"series":6},"\u002Fblog\u002Fmaking-decisions-the-right-way","Making Decisions: The right way","Decisions are hard! Learn how to make the right decisions always",[1285,1299],"2020-06-07",{"path":1518,"title":1519,"description":1520,"categories":1521,"draft":1268,"year":1523,"series":6},"\u002Fblog\u002Fmanage-logs-with-logrotate","Using Logrotate to manage logs","Learn how to use logrotate system utility to manage logs with example",[1522,1266],"Linux","2020-09-08",{"path":1525,"title":1526,"description":1527,"categories":1528,"draft":1268,"year":1529,"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.",[1223,1266],"2020-03-31",{"path":1531,"title":1532,"description":1533,"categories":1534,"draft":1268,"year":1535,"series":6},"\u002Fblog\u002Fnotes-almanack-naval","Book Notes : Almanack of Naval Ravikant","My notes\u002Fhighlights from Almanack of Naval Ravikant book by Eric Jorgenson",[1298,1299],"2020-10-17",{"path":1537,"title":1538,"description":1539,"categories":1540,"draft":1268,"year":1541,"series":6},"\u002Fblog\u002Fnotes-anything-you-want","Book Notes : Anything you want","My notes\u002Fhighlights from Anything you want book by Derek Sivers",[1298,1299],"2021-09-25",{"path":1543,"title":1544,"description":1545,"categories":1546,"draft":1268,"year":1548,"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.",[1298,1547],"Startups","2020-11-03",{"path":1550,"title":1551,"description":1552,"categories":1553,"draft":1268,"year":1554,"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",[1298,1299],"2020-09-16",{"path":1556,"title":1557,"description":1558,"categories":1559,"draft":1268,"year":1560,"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",[1298,1547],"2020-01-07",{"path":1562,"title":1563,"description":1564,"categories":1565,"draft":1268,"year":1567,"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.",[1298,1566],"Entrepreneurship","2022-07-02",{"path":1569,"title":1570,"description":1571,"categories":1572,"draft":1268,"year":1574,"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.",[1298,1573],"Personal Finance","2021-02-26",{"path":1576,"title":1577,"description":1578,"categories":1579,"draft":1268,"year":1580,"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.",[1298,1547],"2020-04-26",{"path":1582,"title":1583,"description":1584,"categories":1585,"draft":1268,"year":1587,"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.",[1298,1586],"Design","2020-05-09",{"path":1589,"title":1590,"description":1591,"categories":1592,"draft":1268,"year":1593,"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.",[1298,1547],"2021-04-14",{"path":1595,"title":1596,"description":1597,"categories":1598,"draft":1268,"year":1600,"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.",[1599,1285],"Career","2023-03-05",{"path":1602,"title":1603,"description":1604,"categories":1605,"draft":1268,"year":1606,"series":6},"\u002Fblog\u002Fpersonal-okrs","Personal OKRs for Success","Why one should set personal OKRs and how to achieve success with them",[1285,1299],"2020-06-27",{"path":1608,"title":1609,"description":1610,"categories":1611,"draft":1268,"year":1613,"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.",[1299,1612],"Poker","2020-06-13",{"path":1615,"title":1616,"description":1617,"categories":1618,"draft":1268,"year":1619,"series":6},"\u002Fblog\u002Fpomodoro","Get work done: The Pomo Way","Learn to focus and get productive by following the Pomodoro Technique",[1285],"2020-10-24",{"path":1621,"title":1622,"description":1623,"categories":1624,"draft":1268,"year":1625,"series":6},"\u002Fblog\u002Fpostgres-constraints","Postgres Constraints","Constraints are line of defense for database. Explore various types of constrainsts in postgres",[1438,1266],"2020-11-07",{"path":1627,"title":1628,"description":1629,"categories":1630,"draft":1268,"year":1631,"series":6},"\u002Fblog\u002Fppf-explained","PPF Explained","Learn basics about Public Provident Fund and why you should invest",[1299,1573],"2020-12-24",{"path":1633,"title":1634,"description":1635,"categories":1636,"draft":1268,"year":1637,"series":6},"\u002Fblog\u002Fproductivity-chrome-extensions","Boost Productivity with Chrome Extensions","Utitizing chrome extensions to boost your productivity!",[1285,1308,1307],"2020-04-24",{"path":1639,"title":1640,"description":1641,"categories":1642,"draft":1268,"year":1643,"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.",[1285,1266],"2020-03-12",{"path":1645,"title":1646,"description":1647,"categories":1648,"draft":1268,"year":1649,"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.",[1298,1299],"2020-04-04",{"path":1651,"title":1652,"description":1653,"categories":1654,"draft":1268,"year":1655,"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.",[1229,1266],"2021-10-03",{"path":1657,"title":1658,"description":1659,"categories":1660,"draft":1268,"year":1661,"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.",[1223,1266],"2019-11-21",{"path":1663,"title":1664,"description":1665,"categories":1666,"draft":1268,"year":1667,"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.",[1223,1438,1266],"2020-02-25",{"path":1669,"title":1670,"description":1671,"categories":1672,"draft":1268,"year":1673,"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.",[1321],"2020-07-17",{"path":1675,"title":1676,"description":1677,"categories":1678,"draft":1268,"year":1679,"series":6},"\u002Fblog\u002Fstack-in-golang","Implement Stack in Golang","Learn how to implement stack data structure in Golang (Full code)",[1223,1266],"2020-09-14",{"path":1681,"title":1682,"description":1683,"categories":1684,"draft":1268,"year":1685,"series":6},"\u002Fblog\u002Fstart-oss-today","Start your Open Source journey today","Start your OSS journey with intro to GIT. Participate in Hacktoberfest!",[1376,1266],"2020-09-19",{"path":1687,"title":1688,"description":1689,"categories":1690,"draft":1268,"year":1692,"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.",[1266,1691],"Frontend","2021-02-05",{"path":1694,"title":1695,"description":1696,"categories":1697,"draft":1268,"year":1698,"series":6},"\u002Fblog\u002Fterm-insurance","Term insurance Simplified","Everything you need to know before you buy a term insurance.",[1299,1573],"2020-11-29",{"path":1700,"title":1701,"description":1702,"categories":1703,"draft":1268,"year":1705,"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",[1522,1704,1266],"Terminal","2020-09-06",{"path":1707,"title":1708,"description":1709,"categories":1710,"draft":1268,"year":1711,"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.",[1298,1299],"2020-05-19",{"path":1713,"title":1714,"description":1715,"categories":1716,"draft":1268,"year":1717,"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.",[1223,1438,1266],"2020-03-18",{"path":1719,"title":1720,"description":1721,"categories":1722,"draft":1268,"year":1723,"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.",[1223,1266],"2022-05-31",{"path":1725,"title":1726,"description":1727,"categories":1728,"draft":1268,"year":1730,"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",[1299,1729],"Tech","2024-06-01",{"path":1732,"title":1733,"description":1734,"categories":1735,"draft":1268,"year":1736,"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!",[1299],"2020-12-31",{"path":1738,"title":1739,"description":1740,"categories":1741,"draft":1268,"year":1742,"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!",[1299],"2021-12-31",1788272170217]