{"id":173,"date":"2023-10-20T10:00:55","date_gmt":"2023-10-20T08:00:55","guid":{"rendered":"https:\/\/blog.clovrlabs.com\/?p=173"},"modified":"2024-06-21T13:47:18","modified_gmt":"2024-06-21T11:47:18","slug":"why-gin-as-a-junior-engineer","status":"publish","type":"post","link":"https:\/\/clovrlabs.com\/blog\/en\/why-gin-as-a-junior-engineer\/","title":{"rendered":"Why Gin as a Junior Engineer learning Golang?"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"173\" class=\"elementor elementor-173\">\n\t\t\t\t<div class=\"elementor-element elementor-element-487c4f4 e-flex e-con-boxed e-con e-parent\" data-id=\"487c4f4\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-a47a507 elementor-widget elementor-widget-testimonial\" data-id=\"a47a507\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"testimonial.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-testimonial-wrapper\">\n\t\t\t\t\t\t\t<div class=\"elementor-testimonial-content\">Golang with Gin and some Github Copilot superpowers is fantastic<\/div>\n\t\t\t\n\t\t\t\t\t\t<div class=\"elementor-testimonial-meta elementor-has-image elementor-testimonial-image-position-aside\">\n\t\t\t\t<div class=\"elementor-testimonial-meta-inner\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"elementor-testimonial-image\">\n\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"226\" height=\"226\" src=\"https:\/\/blog.clovrlabs.com\/wp-content\/uploads\/2023\/10\/marcos.webp\" class=\"attachment-full size-full wp-image-274\" alt=\"Marcos\" srcset=\"https:\/\/blog.clovrlabs.com\/wp-content\/uploads\/2023\/10\/marcos.webp 226w, https:\/\/blog.clovrlabs.com\/wp-content\/uploads\/2023\/10\/marcos-150x150.webp 150w\" sizes=\"(max-width: 226px) 100vw, 226px\" \/>\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<div class=\"elementor-testimonial-details\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"elementor-testimonial-name\">Marcos Fern\u00e1ndez<\/div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"elementor-testimonial-job\">Software Engineer<\/div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-6244ecfc e-flex e-con-boxed e-con e-parent\" data-id=\"6244ecfc\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-14e71b11 elementor-widget-divider--view-line elementor-widget elementor-widget-divider\" data-id=\"14e71b11\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"divider.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-divider\">\n\t\t\t<span class=\"elementor-divider-separator\">\n\t\t\t\t\t\t<\/span>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-42dbb81 e-flex e-con-boxed e-con e-parent\" data-id=\"42dbb81\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-a13a034 elementor-alert-warning elementor-widget elementor-widget-alert\" data-id=\"a13a034\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"alert.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-alert\" role=\"alert\">\n\n\t\t\t\t\t\t<span class=\"elementor-alert-title\">First, in case you aren\u2019t familiar with what I am talking about here, Gin is a web framework for the programming language Golang. It helps you to create web apps and APIs quickly and efficiently. It is designed to be lightweight and easy to use while being flexible and very powerful.<\/span>\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-6143b72f e-flex e-con-boxed e-con e-parent\" data-id=\"6143b72f\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-174ac064 elementor-widget elementor-widget-text-editor\" data-id=\"174ac064\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"d296\" class=\"pw-post-body-paragraph wn wo rl lz b rz wq wr ws sc wt wu wv lj ww wx wy lo wz xa xb lt xc xd xe xf ft bj\" data-selectable-paragraph=\"\">Gin is one of the most popular web frameworks for Golang because multiple reasons. First, it is super easy to use, and it is very well documented. Second, it is super fast. It is one of the fastest web frameworks for Golang. Third, it is very flexible. For example, it lets you add middleware to the request pipeline; one of the ones I always add is telemetry. Definitely, it is a great framework to use.<\/p><p id=\"fbf3\" class=\"pw-post-body-paragraph wn wo rl lz b rz wq wr ws sc wt wu wv lj ww wx wy lo wz xa xb lt xc xd xe xf ft bj\" data-selectable-paragraph=\"\">About Github copilot, I am not going to lie, I am a bit biased here. I am a fan of GitHub Copilot, I think it is a great tool and it is going to change the way we code. I have been using it for a while now and I have to say that I am impressed by how helpful it is. I think it is also an excellent tool for learning a new language, but it also helps you to write code faster and to see how other people are doing things. Of course, it is not perfect, but it helps a lot.<\/p><p id=\"8d4e\" class=\"pw-post-body-paragraph wn wo rl lz b rz wq wr ws sc wt wu wv lj ww wx wy lo wz xa xb lt xc xd xe xf ft bj\" data-selectable-paragraph=\"\">To be able to develop with this stack, we will need a development environment which in my case is going to be Visual Studio Code, nothing super surprising, to be honest. My plugins of choice here are\u00a0<a class=\"af xg\" href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=golang\" target=\"_blank\" rel=\"noopener ugc nofollow\">Go<\/a>\u00a0for debugging tools and, of course,\u00a0<a class=\"af xg\" href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=GitHub.copilot\" target=\"_blank\" rel=\"noopener ugc nofollow\">GitHub Copilot<\/a>.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-1e88645 e-flex e-con-boxed e-con e-parent\" data-id=\"1e88645\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t<div class=\"elementor-element elementor-element-4fe7830 e-flex e-con-boxed e-con e-child\" data-id=\"4fe7830\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-4648b1b elementor-alert-warning elementor-widget elementor-widget-alert\" data-id=\"4648b1b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"alert.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-alert\" role=\"alert\">\n\n\t\t\t\t\t\t<span class=\"elementor-alert-title\">A little bit of context about myself, I finished my master\u2019s degree in Software Engineering a few months ago. I had never ever touched any Golang code, but I was eager to learn about it since, in Clovr Labs, we were using it for some of our components. So I did what I had always done when learning a new language, I started to play with it.<\/span>\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-0033991 e-flex e-con-boxed e-con e-parent\" data-id=\"0033991\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-4c48c54 elementor-widget elementor-widget-text-editor\" data-id=\"4c48c54\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"c2ff\" class=\"pw-post-body-paragraph wn wo rl lz b rz wq wr ws sc wt wu wv lj ww wx wy lo wz xa xb lt xc xd xe xf ft bj\" data-selectable-paragraph=\"\">So I created a straightforward Rest API about something random, lamps in this case. The API has the following endpoints:<\/p><p id=\"9d5e\" class=\"pw-post-body-paragraph wn wo rl lz b rz wq wr ws sc wt wu wv lj ww wx wy lo wz xa xb lt xc xd xe xf ft bj\" data-selectable-paragraph=\"\"><strong class=\"lz la\"><em class=\"wp\">GET \/api\/lamps<\/em><\/strong><\/p><p id=\"3fc9\" class=\"pw-post-body-paragraph wn wo rl lz b rz wq wr ws sc wt wu wv lj ww wx wy lo wz xa xb lt xc xd xe xf ft bj\" data-selectable-paragraph=\"\"><strong class=\"lz la\"><em class=\"wp\">GET \/api\/lamps\/{id}<\/em><\/strong><\/p><p id=\"afac\" class=\"pw-post-body-paragraph wn wo rl lz b rz wq wr ws sc wt wu wv lj ww wx wy lo wz xa xb lt xc xd xe xf ft bj\" data-selectable-paragraph=\"\"><strong class=\"lz la\"><em class=\"wp\">POST \/api\/lamps<\/em><\/strong><\/p><p id=\"ba02\" class=\"pw-post-body-paragraph wn wo rl lz b rz wq wr ws sc wt wu wv lj ww wx wy lo wz xa xb lt xc xd xe xf ft bj\" data-selectable-paragraph=\"\"><strong class=\"lz la\"><em class=\"wp\">PUT \/api\/lamps\/{id}<\/em><\/strong><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-1dd2b84 e-flex e-con-boxed e-con e-parent\" data-id=\"1dd2b84\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-2577310 elementor-widget__width-auto elementor-widget elementor-widget-html\" data-id=\"2577310\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<style>\n  .code-container {\n    overflow-x: auto;\n    margin: 0; \n    padding: 10px;\n  }\n\n  pre {\n    word-wrap: normal;\n    white-space: pre;\n    max-width: 100%;\n    font-size: 14px; \n  }\n\n  @media (max-width: 767px) {\n    .code-container {\n      padding: 0px; \n    }\n    pre {\n      font-size: 11px; \n    }\n  }\n<\/style>\n\n<div class=\"code-container\">\n  <pre>\n    <code>\n      func main() {\n        controller := Controller{}\n        controller.initDatabase()\n\n        router := gin.Default()\n\n        \/\/ Setup CORS\n        config := cors.DefaultConfig()\n        config.AllowAllOrigins = true\n        router.Use(cors.New(config))\n\n        router.GET(\"\/lamps\", controller.getLamps)\n        router.GET(\"\/lamps\/:id\", controller.getLampByID)\n        router.POST(\"\/lamps\", controller.postLamp)\n        router.PUT(\"\/lamps\/:id\", controller.updateLamp)\n\n        router.Run(\"0.0.0.0:8080\")\n      }\n    <\/code>\n  <\/pre>\n<\/div>\n\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-59868ce5 e-flex e-con-boxed e-con e-parent\" data-id=\"59868ce5\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-1ad03499 elementor-widget elementor-widget-text-editor\" data-id=\"1ad03499\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>This piece of code does the setup of the server plus the configuration of the endpoints and calls a method to initialise the database. As you can see, it is pretty straightforward. The only thing that I would like to highlight here is the CORS configuration. I am using the default configuration, which allows all origins. This is not a good practice, but it is good enough for this example.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-600697b7 e-flex e-con-boxed e-con e-parent\" data-id=\"600697b7\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-3a425797 elementor-widget elementor-widget-image\" data-id=\"3a425797\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"768\" height=\"433\" src=\"https:\/\/blog.clovrlabs.com\/wp-content\/uploads\/2023\/12\/golang-post-768x433.webp\" class=\"attachment-medium_large size-medium_large wp-image-182\" alt=\"Laptop screen with code editor\" srcset=\"https:\/\/blog.clovrlabs.com\/wp-content\/uploads\/2023\/12\/golang-post-768x433.webp 768w, https:\/\/blog.clovrlabs.com\/wp-content\/uploads\/2023\/12\/golang-post-300x169.webp 300w, https:\/\/blog.clovrlabs.com\/wp-content\/uploads\/2023\/12\/golang-post-1024x577.webp 1024w, https:\/\/blog.clovrlabs.com\/wp-content\/uploads\/2023\/12\/golang-post.webp 1400w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-5effc3d0 e-flex e-con-boxed e-con e-parent\" data-id=\"5effc3d0\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-7e9fdd02 elementor-widget elementor-widget-text-editor\" data-id=\"7e9fdd02\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>For the database initialisation, I am using Gorm, which is an ORM library for Golang. It is super easy to use and very powerful. I am using it to create the database schema and to connect to it.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-a840fbe e-flex e-con-boxed e-con e-parent\" data-id=\"a840fbe\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t<div class=\"elementor-element elementor-element-b2088b1 e-flex e-con-boxed e-con e-child\" data-id=\"b2088b1\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-3afb083 elementor-widget__width-auto elementor-widget elementor-widget-html\" data-id=\"3afb083\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<style>\n  .code-container {\n    overflow-x: auto;\n    margin: 0; \n    padding: 10px;\n  }\n\n  pre {\n    word-wrap: normal;\n    white-space: pre;\n    max-width: 100%;\n    font-size: 14px; \n  }\n\n  @media (max-width: 767px) {\n    .code-container {\n      padding: 0px; \n    }\n    pre {\n      font-size: 11px; \n    }\n  }\n<\/style>\n\n<div class=\"code-container\">\n  <pre>\n    <code>\n    func (c *Controller) initDatabase() {\n\n\tdb, err := gorm.Open(postgres.Open(dbConnectionString), &gorm.Config{})\n\tif err != nil {\n\t\tlog.Fatalf(\u201cfailed to connect database: %v\u201d, err)\n\t}\n\tc.Database = db\n\n\tc.Database.AutoMigrate(&Lamp{})\n    }\n    <\/code>\n  <\/pre>\n<\/div>\n\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-dda86f6 e-flex e-con-boxed e-con e-parent\" data-id=\"dda86f6\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-a4fb0f5 elementor-widget elementor-widget-text-editor\" data-id=\"a4fb0f5\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>We are using a Postgres database to store the lamps. This database runs in a Docker container initialised by this Docker compose file.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-c622a6b e-flex e-con-boxed e-con e-parent\" data-id=\"c622a6b\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-d8d87ce elementor-widget__width-auto elementor-widget elementor-widget-html\" data-id=\"d8d87ce\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<style>\n  .code-container {\n    overflow-x: auto;\n    margin: 0; \n    padding: 10px;\n  }\n\n  pre {\n    word-wrap: normal;\n    white-space: pre;\n    max-width: 100%;\n    font-size: 14px; \n  }\n\n  @media (max-width: 767px) {\n    .code-container {\n      padding: 0px; \n    }\n    pre {\n      font-size: 11px; \n    }\n  }\n<\/style>\n\n<div class=\"code-container\">\n  <pre>\n    <code>\n    version: \"3\"\n\n    services:\n      db:\n        image: postgres\n        restart: always\n        environment:\n          POSTGRES_USER: user\n          POSTGRES_PASSWORD: password\n          POSTGRES_DB: postgres\n        ports:\n          - \"5432:5432\"\n        volumes:\n          - postgres_data:\/var\/lib\/postgresql\/data\n\n    volumes:\n      postgres_data:\n    <\/code>\n  <\/pre>\n<\/div>\n\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-82b4714 e-flex e-con-boxed e-con e-parent\" data-id=\"82b4714\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-860e699 elementor-widget elementor-widget-text-editor\" data-id=\"860e699\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"85ef\" class=\"wn wo wp lz b rz wq wr ws sc wt wu wv lj ww wx wy lo wz xa xb lt xc xd xe xf ft bj\" data-selectable-paragraph=\"\">Now let\u2019s have a look at the model of the lamp:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-d3137a8 e-flex e-con-boxed e-con e-parent\" data-id=\"d3137a8\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-7ae6165 elementor-widget__width-auto elementor-widget elementor-widget-html\" data-id=\"7ae6165\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<style>\n  .code-container {\n    overflow-x: auto;\n    margin: 0; \n    padding: 10px;\n  }\n\n  pre {\n    word-wrap: normal;\n    white-space: pre;\n    max-width: 100%;\n    font-size: 14px; \n  }\n\n  @media (max-width: 767px) {\n    .code-container {\n      padding: 0px; \n    }\n    pre {\n      font-size: 11px; \n    }\n  }\n<\/style>\n\n<div class=\"code-container\">\n  <pre>\n    <code>\n    type Lamp struct {\n\tID          string `json:\"id\"`\n\tName        string `json:\"name\"`\n\tDescription string `json:\"description\"`\n\tPrice       int    `json:\"price\"`\n    }\n    <\/code>\n  <\/pre>\n<\/div>\n\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-5fb3f5e e-flex e-con-boxed e-con e-parent\" data-id=\"5fb3f5e\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-198abfc elementor-widget elementor-widget-text-editor\" data-id=\"198abfc\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"b2e6\" class=\"pw-post-body-paragraph wn wo rl lz b rz wq wr ws sc wt wu wv lj ww wx wy lo wz xa xb lt xc xd xe xf ft bj\" data-selectable-paragraph=\"\">As you can see, it is a very simple model. It has an ID, a name, a description, and a price. Nothing fancy here.<\/p><p class=\"pw-post-body-paragraph wn wo rl lz b rz wq wr ws sc wt wu wv lj ww wx wy lo wz xa xb lt xc xd xe xf ft bj\" data-selectable-paragraph=\"\">Now let\u2019s have a look at the endpoints:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-d9dc64f e-flex e-con-boxed e-con e-parent\" data-id=\"d9dc64f\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-c54dadd elementor-widget__width-auto elementor-widget elementor-widget-html\" data-id=\"c54dadd\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<style>\n  .code-container {\n    overflow-x: auto;\n    margin: 0; \n    padding: 10px;\n    color: white;\n  }\n\n  pre {\n    word-wrap: normal;\n    white-space: pre;\n    max-width: 100%;\n    font-size: 14px; \n  }\n\n  @media (max-width: 767px) {\n    .code-container {\n      padding: 0px; \n    }\n    pre {\n      font-size: 11px; \n    }\n  }\n<\/style>\n\n<div class=\"code-container\">\n  <pre>\n    <code>\n    func (ctrl *Controller) getLamps(c *gin.Context) {\n\tvar lamps []Lamp\n\tresult := ctrl.Database.Find(&Lamp{})\n\tresult.Scan(&lamps)\n\n\tc.IndentedJSON(http.StatusOK, lamps)\n    }\n\n    func (ctrl *Controller) getLampByID(c *gin.Context) {\n    \tid := c.Param(\"id\")\n    \n    \tvar lamp Lamp\n    \tctrl.Database.Model(&Lamp{}).First(&lamp, id)\n    \n    \tif lamp.ID == 0 {\n    \t\tc.IndentedJSON(http.StatusNotFound, gin.H{\"message\": \"lamp not found\"})\n    \t\treturn\n    \t}\n    \n    \tc.JSON(http.StatusOK, lamp)\n    }\n    \n    func (ctrl *Controller) postLamp(c *gin.Context) {\n    \tvar newLamp Lamp\n    \tif err := c.ShouldBindJSON(&newLamp); err != nil {\n    \t\tc.JSON(http.StatusBadRequest, gin.H{\"message\": \"invalid request\"})\n    \t\treturn\n    \t}\n    \n    \tctrl.Database.Create(&newLamp)\n    \n    \tc.JSON(http.StatusCreated, newLamp)\n    }\n    \n    func (ctrl *Controller) updateLamp(c *gin.Context) {\n    \tid := c.Param(\"id\")\n    \tvar updatedLamp Lamp\n    \tif err := c.ShouldBindJSON(&updatedLamp); err != nil {\n    \t\tc.JSON(http.StatusBadRequest, gin.H{\"message\": \"invalid request\"})\n    \t\treturn\n    \t}\n    \n    \tvar lamp Lamp\n    \tctrl.Database.Model(&Lamp{}).First(&lamp, id)\n    \n    \tif lamp.ID != 0 {\n    \t\tctrl.Database.Model(&Lamp{}).Where(\"id = ?\", id).Updates(updatedLamp)\n    \t\tc.JSON(http.StatusOK, updatedLamp)\n    \t\treturn\n    \t}\n    \n    \tc.JSON(http.StatusNotFound, gin.H{\"message\": \"lamp not found\"})\n    }\n    <\/code>\n  <\/pre>\n<\/div>\n\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-9f84815 e-flex e-con-boxed e-con e-parent\" data-id=\"9f84815\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-df836c1 elementor-widget elementor-widget-text-editor\" data-id=\"df836c1\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"d16d\" class=\"pw-post-body-paragraph wn wo rl lz b rz wq wr ws sc wt wu wv lj ww wx wy lo wz xa xb lt xc xd xe xf ft bj\" data-selectable-paragraph=\"\">As you can see, they are pretty simple. The first one returns all the lamps, the second one returns a lamp by ID, the third one creates a new lamp, and the last one updates a lamp by ID.<\/p><p id=\"a79b\" class=\"pw-post-body-paragraph wn wo rl lz b rz wq wr ws sc wt wu wv lj ww wx wy lo wz xa xb lt xc xd xe xf ft bj\" data-selectable-paragraph=\"\">I would recommend you to test the API with Postman or any other similar tool that you like. I am using Postman for this example.<\/p><p id=\"6705\" class=\"pw-post-body-paragraph wn wo rl lz b rz wq wr ws sc wt wu wv lj ww wx wy lo wz xa xb lt xc xd xe xf ft bj\" data-selectable-paragraph=\"\">With this, only being a bit more than 120 LOC, we have a fully functional API with the four endpoints that we have seen before. This can be for sure improved a lot. Still, it is a good example to see a glimpse of how powerful and, most importantly, for a junior engineer trying to learn a new language, how easy it is to set up your own fully functional REST API.<\/p><p id=\"3ebf\" class=\"pw-post-body-paragraph wn wo rl lz b rz wq wr ws sc wt wu wv lj ww wx wy lo wz xa xb lt xc xd xe xf ft bj\" data-selectable-paragraph=\"\">I hope you enjoyed this article and learned something new and valuable.<\/p><p id=\"a7db\" class=\"pw-post-body-paragraph wn wo rl lz b rz wq wr ws sc wt wu wv lj ww wx wy lo wz xa xb lt xc xd xe xf ft bj\" data-selectable-paragraph=\"\">If you want to have a look at the full code, you can find it\u00a0<a class=\"af xg\" href=\"https:\/\/github.com\/markettes\/GIN-example\" target=\"_blank\" rel=\"noopener ugc nofollow\">here<\/a>.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-748a9d8 e-flex e-con-boxed e-con e-parent\" data-id=\"748a9d8\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-a920e79 elementor-widget elementor-widget-spacer\" data-id=\"a920e79\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-21bd6c0 e-flex e-con-boxed e-con e-parent\" data-id=\"21bd6c0\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-e4d5083 elementor-widget elementor-widget-button\" data-id=\"e4d5083\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-button-wrapper\">\n\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-sm\" href=\"https:\/\/blog.clovrlabs.com\/\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">\u2190 Back    <\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Golang with Gin and some Github Copilot superpowers is fantastic<\/p>\n","protected":false},"author":1,"featured_media":182,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[226,223],"tags":[228,175,231],"class_list":["post-173","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-golang-en","category-technology-en","tag-golang-en","tag-junior-en","tag-technology-en"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Why Gin as a Junior Engineer learning Golang? - Clovr Labs<\/title>\n<meta name=\"description\" content=\"Gin is a web framework for the programming language Golang. It helps you to create web apps and APIs quickly and efficiently. It is designed to be lightweight and easy to use while being flexible and very powerful.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/clovrlabs.com\/blog\/en\/why-gin-as-a-junior-engineer\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Why Gin as a Junior Engineer learning Golang?\" \/>\n<meta property=\"og:description\" content=\"Gin is a web framework for the programming language Golang. It helps you to create web apps and APIs quickly and efficiently. It is designed to be lightweight and easy to use while being flexible and very powerful.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/clovrlabs.com\/blog\/en\/why-gin-as-a-junior-engineer\/\" \/>\n<meta property=\"og:site_name\" content=\"Clovr Labs\" \/>\n<meta property=\"article:published_time\" content=\"2023-10-20T08:00:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-06-21T11:47:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blog.clovrlabs.com\/wp-content\/uploads\/2023\/12\/golang-post.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1400\" \/>\n\t<meta property=\"og:image:height\" content=\"789\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"clovrblog\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"clovrblog\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/clovrlabs.com\\\/blog\\\/en\\\/why-gin-as-a-junior-engineer\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/clovrlabs.com\\\/blog\\\/en\\\/why-gin-as-a-junior-engineer\\\/\"},\"author\":{\"name\":\"clovrblog\",\"@id\":\"https:\\\/\\\/clovrlabs.com\\\/blog\\\/#\\\/schema\\\/person\\\/a6b5b6390ea72a5e384639ee38c0fd88\"},\"headline\":\"Why Gin as a Junior Engineer learning Golang?\",\"datePublished\":\"2023-10-20T08:00:55+00:00\",\"dateModified\":\"2024-06-21T11:47:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/clovrlabs.com\\\/blog\\\/en\\\/why-gin-as-a-junior-engineer\\\/\"},\"wordCount\":742,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/clovrlabs.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/clovrlabs.com\\\/blog\\\/en\\\/why-gin-as-a-junior-engineer\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/blog.clovrlabs.com\\\/wp-content\\\/uploads\\\/2023\\\/12\\\/golang-post.webp\",\"keywords\":[\"Golang\",\"Junior\",\"Technology\"],\"articleSection\":[\"Golang\",\"Technology\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/clovrlabs.com\\\/blog\\\/en\\\/why-gin-as-a-junior-engineer\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/clovrlabs.com\\\/blog\\\/en\\\/why-gin-as-a-junior-engineer\\\/\",\"url\":\"https:\\\/\\\/clovrlabs.com\\\/blog\\\/en\\\/why-gin-as-a-junior-engineer\\\/\",\"name\":\"Why Gin as a Junior Engineer learning Golang? - Clovr Labs\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/clovrlabs.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/clovrlabs.com\\\/blog\\\/en\\\/why-gin-as-a-junior-engineer\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/clovrlabs.com\\\/blog\\\/en\\\/why-gin-as-a-junior-engineer\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/blog.clovrlabs.com\\\/wp-content\\\/uploads\\\/2023\\\/12\\\/golang-post.webp\",\"datePublished\":\"2023-10-20T08:00:55+00:00\",\"dateModified\":\"2024-06-21T11:47:18+00:00\",\"description\":\"Gin is a web framework for the programming language Golang. It helps you to create web apps and APIs quickly and efficiently. It is designed to be lightweight and easy to use while being flexible and very powerful.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/clovrlabs.com\\\/blog\\\/en\\\/why-gin-as-a-junior-engineer\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/clovrlabs.com\\\/blog\\\/en\\\/why-gin-as-a-junior-engineer\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/clovrlabs.com\\\/blog\\\/en\\\/why-gin-as-a-junior-engineer\\\/#primaryimage\",\"url\":\"https:\\\/\\\/blog.clovrlabs.com\\\/wp-content\\\/uploads\\\/2023\\\/12\\\/golang-post.webp\",\"contentUrl\":\"https:\\\/\\\/blog.clovrlabs.com\\\/wp-content\\\/uploads\\\/2023\\\/12\\\/golang-post.webp\",\"width\":1400,\"height\":789,\"caption\":\"Laptop screen with code editor\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/clovrlabs.com\\\/blog\\\/en\\\/why-gin-as-a-junior-engineer\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/clovrlabs.com\\\/blog\\\/es\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Why Gin as a Junior Engineer learning Golang?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/clovrlabs.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/clovrlabs.com\\\/blog\\\/\",\"name\":\"Clovr Labs Blog\",\"description\":\"Blog\",\"publisher\":{\"@id\":\"https:\\\/\\\/clovrlabs.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/clovrlabs.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/clovrlabs.com\\\/blog\\\/#organization\",\"name\":\"Clovr Labs Blog\",\"url\":\"https:\\\/\\\/clovrlabs.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/clovrlabs.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/blog.clovrlabs.com\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/CL-LOGO-BLACK-VECTOR.png\",\"contentUrl\":\"https:\\\/\\\/blog.clovrlabs.com\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/CL-LOGO-BLACK-VECTOR.png\",\"width\":2059,\"height\":291,\"caption\":\"Clovr Labs Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/clovrlabs.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/es.linkedin.com\\\/company\\\/clovrlabsbcn\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/clovrlabs.com\\\/blog\\\/#\\\/schema\\\/person\\\/a6b5b6390ea72a5e384639ee38c0fd88\",\"name\":\"clovrblog\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c0cd7a51aa9dd8213d8339eaed5d20be5f089e99e66002c68301e81316f13f52?s=96&d=retro&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c0cd7a51aa9dd8213d8339eaed5d20be5f089e99e66002c68301e81316f13f52?s=96&d=retro&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c0cd7a51aa9dd8213d8339eaed5d20be5f089e99e66002c68301e81316f13f52?s=96&d=retro&r=g\",\"caption\":\"clovrblog\"},\"sameAs\":[\"http:\\\/\\\/127.0.0.1\"],\"url\":\"https:\\\/\\\/clovrlabs.com\\\/blog\\\/author\\\/clovrblog\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Why Gin as a Junior Engineer learning Golang? - Clovr Labs","description":"Gin is a web framework for the programming language Golang. It helps you to create web apps and APIs quickly and efficiently. It is designed to be lightweight and easy to use while being flexible and very powerful.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/clovrlabs.com\/blog\/en\/why-gin-as-a-junior-engineer\/","og_locale":"en_GB","og_type":"article","og_title":"Why Gin as a Junior Engineer learning Golang?","og_description":"Gin is a web framework for the programming language Golang. It helps you to create web apps and APIs quickly and efficiently. It is designed to be lightweight and easy to use while being flexible and very powerful.","og_url":"https:\/\/clovrlabs.com\/blog\/en\/why-gin-as-a-junior-engineer\/","og_site_name":"Clovr Labs","article_published_time":"2023-10-20T08:00:55+00:00","article_modified_time":"2024-06-21T11:47:18+00:00","og_image":[{"width":1400,"height":789,"url":"https:\/\/blog.clovrlabs.com\/wp-content\/uploads\/2023\/12\/golang-post.webp","type":"image\/webp"}],"author":"clovrblog","twitter_card":"summary_large_image","twitter_misc":{"Written by":"clovrblog","Estimated reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/clovrlabs.com\/blog\/en\/why-gin-as-a-junior-engineer\/#article","isPartOf":{"@id":"https:\/\/clovrlabs.com\/blog\/en\/why-gin-as-a-junior-engineer\/"},"author":{"name":"clovrblog","@id":"https:\/\/clovrlabs.com\/blog\/#\/schema\/person\/a6b5b6390ea72a5e384639ee38c0fd88"},"headline":"Why Gin as a Junior Engineer learning Golang?","datePublished":"2023-10-20T08:00:55+00:00","dateModified":"2024-06-21T11:47:18+00:00","mainEntityOfPage":{"@id":"https:\/\/clovrlabs.com\/blog\/en\/why-gin-as-a-junior-engineer\/"},"wordCount":742,"commentCount":0,"publisher":{"@id":"https:\/\/clovrlabs.com\/blog\/#organization"},"image":{"@id":"https:\/\/clovrlabs.com\/blog\/en\/why-gin-as-a-junior-engineer\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.clovrlabs.com\/wp-content\/uploads\/2023\/12\/golang-post.webp","keywords":["Golang","Junior","Technology"],"articleSection":["Golang","Technology"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/clovrlabs.com\/blog\/en\/why-gin-as-a-junior-engineer\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/clovrlabs.com\/blog\/en\/why-gin-as-a-junior-engineer\/","url":"https:\/\/clovrlabs.com\/blog\/en\/why-gin-as-a-junior-engineer\/","name":"Why Gin as a Junior Engineer learning Golang? - Clovr Labs","isPartOf":{"@id":"https:\/\/clovrlabs.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/clovrlabs.com\/blog\/en\/why-gin-as-a-junior-engineer\/#primaryimage"},"image":{"@id":"https:\/\/clovrlabs.com\/blog\/en\/why-gin-as-a-junior-engineer\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.clovrlabs.com\/wp-content\/uploads\/2023\/12\/golang-post.webp","datePublished":"2023-10-20T08:00:55+00:00","dateModified":"2024-06-21T11:47:18+00:00","description":"Gin is a web framework for the programming language Golang. It helps you to create web apps and APIs quickly and efficiently. It is designed to be lightweight and easy to use while being flexible and very powerful.","breadcrumb":{"@id":"https:\/\/clovrlabs.com\/blog\/en\/why-gin-as-a-junior-engineer\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/clovrlabs.com\/blog\/en\/why-gin-as-a-junior-engineer\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/clovrlabs.com\/blog\/en\/why-gin-as-a-junior-engineer\/#primaryimage","url":"https:\/\/blog.clovrlabs.com\/wp-content\/uploads\/2023\/12\/golang-post.webp","contentUrl":"https:\/\/blog.clovrlabs.com\/wp-content\/uploads\/2023\/12\/golang-post.webp","width":1400,"height":789,"caption":"Laptop screen with code editor"},{"@type":"BreadcrumbList","@id":"https:\/\/clovrlabs.com\/blog\/en\/why-gin-as-a-junior-engineer\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/clovrlabs.com\/blog\/es\/"},{"@type":"ListItem","position":2,"name":"Why Gin as a Junior Engineer learning Golang?"}]},{"@type":"WebSite","@id":"https:\/\/clovrlabs.com\/blog\/#website","url":"https:\/\/clovrlabs.com\/blog\/","name":"Clovr Labs Blog","description":"Blog","publisher":{"@id":"https:\/\/clovrlabs.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/clovrlabs.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/clovrlabs.com\/blog\/#organization","name":"Clovr Labs Blog","url":"https:\/\/clovrlabs.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/clovrlabs.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/blog.clovrlabs.com\/wp-content\/uploads\/2024\/06\/CL-LOGO-BLACK-VECTOR.png","contentUrl":"https:\/\/blog.clovrlabs.com\/wp-content\/uploads\/2024\/06\/CL-LOGO-BLACK-VECTOR.png","width":2059,"height":291,"caption":"Clovr Labs Blog"},"image":{"@id":"https:\/\/clovrlabs.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/es.linkedin.com\/company\/clovrlabsbcn"]},{"@type":"Person","@id":"https:\/\/clovrlabs.com\/blog\/#\/schema\/person\/a6b5b6390ea72a5e384639ee38c0fd88","name":"clovrblog","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/c0cd7a51aa9dd8213d8339eaed5d20be5f089e99e66002c68301e81316f13f52?s=96&d=retro&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c0cd7a51aa9dd8213d8339eaed5d20be5f089e99e66002c68301e81316f13f52?s=96&d=retro&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c0cd7a51aa9dd8213d8339eaed5d20be5f089e99e66002c68301e81316f13f52?s=96&d=retro&r=g","caption":"clovrblog"},"sameAs":["http:\/\/127.0.0.1"],"url":"https:\/\/clovrlabs.com\/blog\/author\/clovrblog\/"}]}},"_links":{"self":[{"href":"https:\/\/clovrlabs.com\/blog\/wp-json\/wp\/v2\/posts\/173","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/clovrlabs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/clovrlabs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/clovrlabs.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/clovrlabs.com\/blog\/wp-json\/wp\/v2\/comments?post=173"}],"version-history":[{"count":0,"href":"https:\/\/clovrlabs.com\/blog\/wp-json\/wp\/v2\/posts\/173\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/clovrlabs.com\/blog\/wp-json\/wp\/v2\/media\/182"}],"wp:attachment":[{"href":"https:\/\/clovrlabs.com\/blog\/wp-json\/wp\/v2\/media?parent=173"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/clovrlabs.com\/blog\/wp-json\/wp\/v2\/categories?post=173"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/clovrlabs.com\/blog\/wp-json\/wp\/v2\/tags?post=173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}