{"id":9090,"date":"2025-06-24T12:56:38","date_gmt":"2025-06-24T07:26:38","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=9090"},"modified":"2025-06-24T13:23:55","modified_gmt":"2025-06-24T07:53:55","slug":"golang-functions","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/golang-functions\/","title":{"rendered":"GoLang Functions"},"content":{"rendered":"\n<p><strong>Introduction:<\/strong><br>          Functions are building blocks of a program. They encapsulate logic, help in reusable code, and also organize the code into simple and manageable pieces. In this section, we will explore how functions work in GoLang.<\/p>\n\n\n\n<p><strong><em>What are Functions in Go?<\/em><\/strong><br>Like all other functions, a function here is a block of code that performs a particular task. Function accepts the input, which is passed as parameters, processes them, and returns values as output.<br><strong>Basic Syntax:<\/strong><br><strong><em>func<\/em><\/strong> functionName(parameter1 type1, parameter2 type2) returnType { <br><em>\/\/ function body<\/em> <br>return value<br> }<br><strong>Example:<\/strong><br><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-14.png\"><img loading=\"lazy\" decoding=\"async\" width=\"392\" height=\"282\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-14.png\" alt=\"\" class=\"wp-image-9110\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-14.png 392w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-14-300x216.png 300w\" sizes=\"auto, (max-width: 392px) 100vw, 392px\" \/><\/a><\/figure>\n\n\n\n<p>Output:<br>Hello, Divya!<br><strong>Function Parameters:<\/strong><br><br>A function can accept zero or more parameters. Parameters are given as a name followed by their data type.<br><strong>Single Parameter:<\/strong><br>func square(x int) int {<br> return x * x<br>}<br>Here variable or parameter name is x, and its data type is &#8220;int&#8221;.<br><strong>Multiple Parameters:<\/strong><br>func add(a int, b int) int <br>{ <br>return a + b <br>}<br>Inside the function, we are passing two parameters, <code>a<\/code> and <code>b<\/code>. Instead of specifying the data type separately for each variable, we can declare a common type for both.<\/p>\n\n\n\n<p>func add(a, b int) int { <br>return a + b<br> }<br><strong><em>Variadic Functions:<\/em><\/strong><br>Go supports <strong>variadic functions<\/strong>, which allow a function to accept a variable number of arguments as parameters.<br><strong>Example:<\/strong><br><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-12.png\"><img loading=\"lazy\" decoding=\"async\" width=\"468\" height=\"312\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-12.png\" alt=\"\" class=\"wp-image-9107\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-12.png 468w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-12-300x200.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-12-450x300.png 450w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-12-272x182.png 272w\" sizes=\"auto, (max-width: 468px) 100vw, 468px\" \/><\/a><\/figure>\n\n\n\n<p>Output:<br>6<br>15<br><strong><em>Return Values:<\/em><\/strong><br>Go functions can return zero, one, or multiple values.<br>The examples shared earlier return a single value as the output.<br>One of Go\u2019s unique features is that <strong>functions can return more than one value<\/strong>. This is particularly useful when you want to return a result along with an <strong>error<\/strong> or <strong>status indicator<\/strong>.<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-11.png\"><img loading=\"lazy\" decoding=\"async\" width=\"537\" height=\"366\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-11.png\" alt=\"\" class=\"wp-image-9106\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-11.png 537w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-11-300x204.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-11-440x300.png 440w\" sizes=\"auto, (max-width: 537px) 100vw, 537px\" \/><\/a><\/figure>\n\n\n\n<p>Output:<br>Error: division by zero<\/p>\n\n\n\n<p>In this example, an error is returned because a number cannot be divided by zero. However, if valid values are passed (where the divisor is not zero), the function returns the correct result.<br><br><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-10.png\"><img loading=\"lazy\" decoding=\"async\" width=\"555\" height=\"366\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-10.png\" alt=\"\" class=\"wp-image-9105\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-10.png 555w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-10-300x198.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-10-455x300.png 455w\" sizes=\"auto, (max-width: 555px) 100vw, 555px\" \/><\/a><\/figure>\n\n\n\n<p><br>Output:<br>Result: 5<\/p>\n\n\n\n<p><br>This pattern is common in Go and is preferred over exceptions. It encourages developers to explicitly handle errors, improving code reliability and readability.<br><strong><em>Named Return values:<\/em><\/strong><br>In Go, we can name the return values in a function&#8217;s signature. It enhances readability and simplifies the function structure. This approach allows to assign values directly within the function body without the need to declare additional variables. Additionally, it enables the use of a naked return\u2014a return statement without any arguments\u2014since the named return variables are automatically returned. This feature is particularly useful in short functions where the role of each return value is obvious, making the code more concise and easier to understand.<\/p>\n\n\n\n<p>Example:<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-9.png\"><img loading=\"lazy\" decoding=\"async\" width=\"690\" height=\"270\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-9.png\" alt=\"\" class=\"wp-image-9104\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-9.png 690w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-9-300x117.png 300w\" sizes=\"auto, (max-width: 690px) 100vw, 690px\" \/><\/a><\/figure>\n\n\n\n<p>Output:<br>Area:15<br>Perimeter:16<\/p>\n\n\n\n<p><strong><em>Higher-Order Functions:<\/em><\/strong><br>Functions that take other functions as arguments or return functions as results are called Higher-order functions.<br><strong>Example:<\/strong><br><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-8.png\"><img loading=\"lazy\" decoding=\"async\" width=\"633\" height=\"262\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-8.png\" alt=\"\" class=\"wp-image-9103\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-8.png 633w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-8-300x124.png 300w\" sizes=\"auto, (max-width: 633px) 100vw, 633px\" \/><\/a><\/figure>\n\n\n\n<p>Output: 5<br>Here, applyorder is a higher-order function because it accepts both integers and a function as arguments.<\/p>\n\n\n\n<p><strong>Conclusion:<\/strong><\/p>\n\n\n\n<p>In this section, we explored how functions are used in GoLang.<br>Previous post: https:\/\/pheonixsolutions.com\/blog\/go-lang-variables\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: Functions are building blocks of a program. They encapsulate logic, help in reusable code, and also organize the code into simple and manageable pieces. In this section, we will explore how functions work in GoLang. What are Functions in Go?Like all other functions, a function here is a block&hellip; <a href=\"https:\/\/pheonixsolutions.com\/blog\/golang-functions\/\" class=\"more-link read-more\" rel=\"bookmark\">Continue Reading <span class=\"screen-reader-text\">GoLang Functions<\/span><i class=\"fa fa-arrow-right\"><\/i><\/a><\/p>\n","protected":false},"author":502,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":{"0":"post-9090","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-uncategorized","7":"h-entry","9":"h-as-article"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Pheonix Solutions - We Empower Your Business Growth<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/pheonixsolutions.com\/blog\/golang-functions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Pheonix Solutions - We Empower Your Business Growth\" \/>\n<meta property=\"og:description\" content=\"Introduction: Functions are building blocks of a program. They encapsulate logic, help in reusable code, and also organize the code into simple and manageable pieces. In this section, we will explore how functions work in GoLang. What are Functions in Go?Like all other functions, a function here is a block&hellip; Continue Reading GoLang Functions\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pheonixsolutions.com\/blog\/golang-functions\/\" \/>\n<meta property=\"og:site_name\" content=\"PHEONIXSOLUTIONS\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/PheonixSolutions-209942982759387\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-06-24T07:26:38+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-24T07:53:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-14.png\" \/>\n\t<meta property=\"og:image:width\" content=\"392\" \/>\n\t<meta property=\"og:image:height\" content=\"282\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Keerthana P\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@pheonixsolution\" \/>\n<meta name=\"twitter:site\" content=\"@pheonixsolution\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Keerthana P\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/golang-functions\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/golang-functions\\\/\"},\"author\":{\"name\":\"Keerthana P\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/bfb764836e66c01d0c03dd2e79ce94fa\"},\"headline\":\"GoLang Functions\",\"datePublished\":\"2025-06-24T07:26:38+00:00\",\"dateModified\":\"2025-06-24T07:53:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/golang-functions\\\/\"},\"wordCount\":473,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/golang-functions\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/image-14.png\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/golang-functions\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/golang-functions\\\/\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/golang-functions\\\/\",\"name\":\"Pheonix Solutions - We Empower Your Business Growth\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/golang-functions\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/golang-functions\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/image-14.png\",\"datePublished\":\"2025-06-24T07:26:38+00:00\",\"dateModified\":\"2025-06-24T07:53:55+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/golang-functions\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/golang-functions\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/golang-functions\\\/#primaryimage\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/image-14.png\",\"contentUrl\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/image-14.png\",\"width\":392,\"height\":282},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/golang-functions\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"GoLang Functions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/\",\"name\":\"Pheonix Solutions\",\"description\":\"We Empower Your Business Growth\",\"publisher\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#organization\",\"name\":\"PheonixSolutions\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/12\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/12\\\/logo.png\",\"width\":454,\"height\":300,\"caption\":\"PheonixSolutions\"},\"image\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/PheonixSolutions-209942982759387\\\/\",\"https:\\\/\\\/x.com\\\/pheonixsolution\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/bfb764836e66c01d0c03dd2e79ce94fa\",\"name\":\"Keerthana P\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a2fbfc942637609ceefb9cbdeedd3fe92320c9f5212098280c846d6d8597088c?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a2fbfc942637609ceefb9cbdeedd3fe92320c9f5212098280c846d6d8597088c?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a2fbfc942637609ceefb9cbdeedd3fe92320c9f5212098280c846d6d8597088c?s=96&r=g\",\"caption\":\"Keerthana P\"},\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/author\\\/keerthana\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Pheonix Solutions - We Empower Your Business Growth","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:\/\/pheonixsolutions.com\/blog\/golang-functions\/","og_locale":"en_US","og_type":"article","og_title":"Pheonix Solutions - We Empower Your Business Growth","og_description":"Introduction: Functions are building blocks of a program. They encapsulate logic, help in reusable code, and also organize the code into simple and manageable pieces. In this section, we will explore how functions work in GoLang. What are Functions in Go?Like all other functions, a function here is a block&hellip; Continue Reading GoLang Functions","og_url":"https:\/\/pheonixsolutions.com\/blog\/golang-functions\/","og_site_name":"PHEONIXSOLUTIONS","article_publisher":"https:\/\/www.facebook.com\/PheonixSolutions-209942982759387\/","article_published_time":"2025-06-24T07:26:38+00:00","article_modified_time":"2025-06-24T07:53:55+00:00","og_image":[{"width":392,"height":282,"url":"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-14.png","type":"image\/png"}],"author":"Keerthana P","twitter_card":"summary_large_image","twitter_creator":"@pheonixsolution","twitter_site":"@pheonixsolution","twitter_misc":{"Written by":"Keerthana P","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pheonixsolutions.com\/blog\/golang-functions\/#article","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/blog\/golang-functions\/"},"author":{"name":"Keerthana P","@id":"https:\/\/pheonixsolutions.com\/blog\/#\/schema\/person\/bfb764836e66c01d0c03dd2e79ce94fa"},"headline":"GoLang Functions","datePublished":"2025-06-24T07:26:38+00:00","dateModified":"2025-06-24T07:53:55+00:00","mainEntityOfPage":{"@id":"https:\/\/pheonixsolutions.com\/blog\/golang-functions\/"},"wordCount":473,"commentCount":0,"publisher":{"@id":"https:\/\/pheonixsolutions.com\/blog\/#organization"},"image":{"@id":"https:\/\/pheonixsolutions.com\/blog\/golang-functions\/#primaryimage"},"thumbnailUrl":"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-14.png","inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/pheonixsolutions.com\/blog\/golang-functions\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/pheonixsolutions.com\/blog\/golang-functions\/","url":"https:\/\/pheonixsolutions.com\/blog\/golang-functions\/","name":"Pheonix Solutions - We Empower Your Business Growth","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/pheonixsolutions.com\/blog\/golang-functions\/#primaryimage"},"image":{"@id":"https:\/\/pheonixsolutions.com\/blog\/golang-functions\/#primaryimage"},"thumbnailUrl":"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-14.png","datePublished":"2025-06-24T07:26:38+00:00","dateModified":"2025-06-24T07:53:55+00:00","breadcrumb":{"@id":"https:\/\/pheonixsolutions.com\/blog\/golang-functions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pheonixsolutions.com\/blog\/golang-functions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/pheonixsolutions.com\/blog\/golang-functions\/#primaryimage","url":"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-14.png","contentUrl":"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/06\/image-14.png","width":392,"height":282},{"@type":"BreadcrumbList","@id":"https:\/\/pheonixsolutions.com\/blog\/golang-functions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/pheonixsolutions.com\/blog\/"},{"@type":"ListItem","position":2,"name":"GoLang Functions"}]},{"@type":"WebSite","@id":"https:\/\/pheonixsolutions.com\/blog\/#website","url":"https:\/\/pheonixsolutions.com\/blog\/","name":"Pheonix Solutions","description":"We Empower Your Business Growth","publisher":{"@id":"https:\/\/pheonixsolutions.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pheonixsolutions.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/pheonixsolutions.com\/blog\/#organization","name":"PheonixSolutions","url":"https:\/\/pheonixsolutions.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/pheonixsolutions.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2016\/12\/logo.png","contentUrl":"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2016\/12\/logo.png","width":454,"height":300,"caption":"PheonixSolutions"},"image":{"@id":"https:\/\/pheonixsolutions.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/PheonixSolutions-209942982759387\/","https:\/\/x.com\/pheonixsolution"]},{"@type":"Person","@id":"https:\/\/pheonixsolutions.com\/blog\/#\/schema\/person\/bfb764836e66c01d0c03dd2e79ce94fa","name":"Keerthana P","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/a2fbfc942637609ceefb9cbdeedd3fe92320c9f5212098280c846d6d8597088c?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/a2fbfc942637609ceefb9cbdeedd3fe92320c9f5212098280c846d6d8597088c?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a2fbfc942637609ceefb9cbdeedd3fe92320c9f5212098280c846d6d8597088c?s=96&r=g","caption":"Keerthana P"},"url":"https:\/\/pheonixsolutions.com\/blog\/author\/keerthana\/"}]}},"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p7F4uM-2mC","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/9090","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/502"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=9090"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/9090\/revisions"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=9090"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=9090"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=9090"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}