{"id":16078,"date":"2024-09-04T21:15:29","date_gmt":"2024-09-04T17:45:29","guid":{"rendered":"https:\/\/www.itpiran.net\/blog\/?p=16078"},"modified":"2024-09-04T21:15:29","modified_gmt":"2024-09-04T17:45:29","slug":"how-to-install-go-and-set-up-a-local-programming-environment-on-macos","status":"publish","type":"post","link":"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\/","title":{"rendered":"How to install Go and set up a local development environment on macOS"},"content":{"rendered":"<h2 id=\"%d9%85%d9%82%d8%af%d9%85%d9%87\">Introduction<\/h2>\n<p>Go is a programming language born out of frustration. At Google, developers were tired of having to make trade-offs when choosing a language for a new project. Some languages run efficiently but take a long time to compile, while others were easy to write but inefficient in production. So Google invented Go, designing the language to have it all: fast to compile, fast to run, easy to write, and easy to deploy.<\/p>\n<p>While Go is a versatile language that can be used for many types of projects, from web applications to command-line tools, it is particularly well-suited for distributed systems and microservice architectures, and is known as a cloud language. It helps the modern programmer with a robust set of tools, eliminating the formatting discussions that are part of the language specification, and also simplifies deployment by compiling each program and all its dependencies into a single binary. Go is easy to learn, with a very small set of keywords, making it a great choice for both novice and veteran developers.<\/p>\n<p>In this introductory tutorial, you will install Go on your local macOS machine and run your first application to prove that the installation worked.<\/p>\n<h5 id=\"%d9%be%db%8c%d8%b4-%d9%86%db%8c%d8%a7%d8%b2%d9%87%d8%a7\">Prerequisites<\/h5>\n<ul>\n<li>You need a macOS computer with administrative access that is connected to the internet.<\/li>\n<\/ul>\n<h2 id=\"%d9%85%d8%b1%d8%ad%d9%84%d9%87-1-%d8%a8%d8%a7%d8%b2-%da%a9%d8%b1%d8%af%d9%86-%d8%aa%d8%b1%d9%85%db%8c%d9%86%d8%a7%d9%84\">Step 1 \u2013 Open Terminal<\/h2>\n<p>The macOS Terminal is an application that you can use to access the command line interface. You can find it by going to the Finder, navigating to the Applications folder, and then to the Utilities folder. From here, double-click Terminal.<\/p>\n<p>Now that you have the terminal open, you can download and install Xcode, the developer tools package you need to install Go.<\/p>\n<h2 id=\"%d9%85%d8%b1%d8%ad%d9%84%d9%87-2-%d9%86%d8%b5%d8%a8-xcode\">Step 2 \u2013 Install Xcode<\/h2>\n<p>Xcode is an integrated development environment (IDE) that includes software development tools for macOS. You can check if Xcode is already installed by typing the following in Terminal:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>xcode-select -p\r\n<\/code><\/pre>\n<\/div>\n<p>The following output means that Xcode is already installed:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>Output\r\n\/Library\/Developer\/CommandLineTools<\/code><\/pre>\n<\/div>\n<p>If you get an error, install Xcode from the App Store and accept the default options.<\/p>\n<p>Once Xcode is installed, return to your terminal window. Next, you need to install the separate Xcode Command Line Tools application, which you can do by typing:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>xcode-select --install\r\n<\/code><\/pre>\n<\/div>\n<p>At this point, Xcode and its Command Line Tools application are fully installed and you are ready to install the Homebrew package manager.<\/p>\n<h2 id=\"%d9%85%d8%b1%d8%ad%d9%84%d9%87-3-%d9%86%d8%b5%d8%a8-%d9%88-%d8%b1%d8%a7%d9%87-%d8%a7%d9%86%d8%af%d8%a7%d8%b2%db%8c-homebrew\">Step 3 \u2013 Installing and Setting Up Homebrew<\/h2>\n<p>While the macOS terminal is very similar to Linux terminals and other Unix-like systems, it doesn&#039;t come with an official command-line package manager like Linux distributions. A package manager helps you install, upgrade and configure software, and uninstall it, either interactively from a terminal or within a script. There are several open source (and unofficial) package managers for macOS, and Homebrew has emerged as one of the most popular. It offers a quick and flexible way to install and update Go on macOS.<\/p>\n<p>To install Homebrew, run this in the terminal:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>\/bin\/bash -c \"$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/HEAD\/install.sh)\"\r\n<\/code><\/pre>\n<\/div>\n<p>This command will download a script from GitHub and install Homebrew. If you want to enter your password, note that your keystrokes will not be displayed in the terminal window, but they will be recorded. Just press the return key after entering your password. Otherwise, press y for &quot;yes&quot; whenever you are asked to confirm the installation.<\/p>\n<p>Once the installation is complete, you&#039;ll place the Homebrew directories at the top of your PATH environment variable so that anything you install via Homebrew takes precedence over any similarly named programs that come pre-installed on macOS (if any). Since macOS doesn&#039;t come with Go, putting Homebrew at the top of your PATH isn&#039;t strictly necessary in this case, but for the sake of consistency, many developers prefer to add Homebrew to the top of their PATH.<\/p>\n<p>To do this, create or open the ~\/.zprofile file with the nano command-line text editor:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>nano ~\/.zprofile\r\n<\/code><\/pre>\n<\/div>\n<p><span style=\"color: #ff0000;\">Note: If you&#039;re running a version of macOS older than Catalina 10.15, your Terminal probably uses the Bash shell (\/bin\/bash) instead of the Z-shell (\/bin\/zsh). In that case, you&#039;ll need to create or open the ~\/.bash_profile file instead of ~\/.zprofile. To check which shell you&#039;re using, run echo $SHELL.<\/span><\/p>\n<p><span style=\"color: #000000;\">Add the following line to the file:<\/span><\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>eval \"$(\/opt\/homebrew\/bin\/brew shellenv)\"\r\n<\/code><\/pre>\n<\/div>\n<p>Exit nano by typing CTRL+x and when prompted to save the file, type y and then press ENTER.<\/p>\n<p>Now enable these changes:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>source ~\/.zprofile\r\n<\/code><\/pre>\n<\/div>\n<p>You can verify that Homebrew was successfully installed by typing:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>brew doctor\r\n<\/code><\/pre>\n<\/div>\n<p>If no update is needed at this time, the output will be as follows:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>Output\r\nYour system is ready to brew.<\/code><\/pre>\n<\/div>\n<p>Otherwise, you may receive a warning to run another command, such as brew update, to ensure your Homebrew installation is up to date.<\/p>\n<p>Once Homebrew is ready, you can install Go.<\/p>\n<h2 id=\"%d9%85%d8%b1%d8%ad%d9%84%d9%87-4-%d9%86%d8%b5%d8%a8-go\">Step 4 \u2013 Install Go<\/h2>\n<p>You can search for all available Homebrew packages with the brew search command. For the purpose of this tutorial, you will search for Go-related packages or modules:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>brew search golang\r\n<\/code><\/pre>\n<\/div>\n<p><span style=\"color: #ff0000;\">Note: Avoid running brew search go as it will return too many results. The Go language is often called Golang, so use golang as the search term to narrow down the results.<\/span><\/p>\n<p><span style=\"color: #000000;\">The terminal will display a list of items you can install:<\/span><\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>Output\r\ngolang golang-migrate golangci-lint glslang<\/code><\/pre>\n<\/div>\n<p>You want the first result: Glang. Install it now:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>brew install golang\r\n<\/code><\/pre>\n<\/div>\n<p>The installation may take a few minutes. When it&#039;s done, check the version of Go you have installed:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>go version\r\n<\/code><\/pre>\n<\/div>\n<p>Homebrew should install the latest stable version of Go. At the time of writing, that version is 1.19.4.<\/p>\n<p>To update Go in the future, you can run these two commands to first update Homebrew and then Go: (You don&#039;t need to do this now, as you just installed the latest version.)<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>brew update\r\nbrew upgrade golang<\/code><\/pre>\n<\/div>\n<p>brew update updates Homebrew&#039;s own formulas, ensuring that you have the latest information about the packages you want to install. brew upgrade golang updates the golang package to the latest version.<\/p>\n<p>With Go installed, you are ready to compile and run your first program.<\/p>\n<h2 id=\"%d9%85%d8%b1%d8%ad%d9%84%d9%87-6-%d9%86%d9%88%d8%b4%d8%aa%d9%86-hello-world-in-go\">Step 6 \u2013 Writing Hello World in Go<\/h2>\n<p>This section doesn&#039;t explain anything about Go programming. The goal is just to compile and run the simplest program you can imagine to convince yourself that Go works.<\/p>\n<p>From your home directory, create a new file using a text editor like nano:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>nano hello.go\r\n<\/code><\/pre>\n<\/div>\n<p>Paste into this program:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>package main\r\nimport \"fmt\"\r\nfunc main() {\r\nfmt.Println(\"Hello, World!\")\r\n}<\/code><\/pre>\n<\/div>\n<p>Exit nano by typing CTRL+x and when prompted to save the file, type y and then press ENTER.<\/p>\n<p>Then compile and run the program with this command:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>go run hello.go\r\n<\/code><\/pre>\n<\/div>\n<p>You should see this output:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>Output\r\nHello, World!<\/code><\/pre>\n<\/div>\n<p>Go is live! You&#039;re ready to begin your adventures in Go.<\/p>\n<h2 id=\"%d9%86%d8%aa%db%8c%d8%ac%d9%87\">Result<\/h2>\n<p>This tutorial provided the most concise introduction to the Go programming language. You installed Go and ran your first program.<\/p>","protected":false},"excerpt":{"rendered":"Introduction Go is a programming language born out of frustration. At Google, developers from\u2026","protected":false},"author":1,"featured_media":16079,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_yoast_wpseo_focuskw":"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 Go \u0648 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0645\u062d\u0644\u06cc \u062f\u0631 macOS","_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"","_yoast_wpseo_canonical":"","_yoast_wpseo_opengraph-description":"","_yoast_wpseo_opengraph-image":"","_yoast_wpseo_twitter-description":"","_yoast_wpseo_twitter-image":"","_yoast_wpseo_focuskeywords":"","_yoast_wpseo_primary_category":"193","footnotes":""},"categories":[193,363],"tags":[440,432,435],"class_list":{"0":"post-16078","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-tutorials","8":"category-programming","9":"tag-go","10":"tag-macos","11":"tag-programming"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 Go \u0648 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0645\u062d\u0644\u06cc \u062f\u0631 macOS - \u0628\u0644\u0627\u06af ITPiran<\/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:\/\/www.itpiran.net\/blog\/en\/tutorials\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 Go \u0648 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0645\u062d\u0644\u06cc \u062f\u0631 macOS - \u0628\u0644\u0627\u06af ITPiran\" \/>\n<meta property=\"og:description\" content=\"\u0645\u0642\u062f\u0645\u0647 Go \u06cc\u06a9 \u0632\u0628\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0627\u0633\u062a \u06a9\u0647 \u0627\u0632 \u0646\u0627\u0627\u0645\u06cc\u062f\u06cc \u0628\u0647 \u0648\u062c\u0648\u062f \u0622\u0645\u062f\u0647 \u0627\u0633\u062a. \u062f\u0631 \u06af\u0648\u06af\u0644\u060c \u062a\u0648\u0633\u0639\u0647\u200c\u062f\u0647\u0646\u062f\u06af\u0627\u0646 \u0627\u0632&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\/\" \/>\n<meta property=\"og:site_name\" content=\"\u0628\u0644\u0627\u06af ITPiran\" \/>\n<meta property=\"article:published_time\" content=\"2024-09-04T17:45:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.itpiran.net\/2024\/09\/04210134\/macOs-go.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1793\" \/>\n\t<meta property=\"og:image:height\" content=\"1110\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/person\\\/04ed27b919baca468a2273f8e4318f81\"},\"headline\":\"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 Go \u0648 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0645\u062d\u0644\u06cc \u062f\u0631 macOS\",\"datePublished\":\"2024-09-04T17:45:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\\\/\"},\"wordCount\":119,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/09\\\/04210134\\\/macOs-go.jpg\",\"keywords\":[\"Go\",\"macOS\",\"programming\"],\"articleSection\":[\"\u0622\u0645\u0648\u0632\u0634\u06cc\",\"\u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\\\/\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\\\/\",\"name\":\"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 Go \u0648 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0645\u062d\u0644\u06cc \u062f\u0631 macOS - \u0628\u0644\u0627\u06af ITPiran\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/09\\\/04210134\\\/macOs-go.jpg\",\"datePublished\":\"2024-09-04T17:45:29+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\\\/#primaryimage\",\"url\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/09\\\/04210134\\\/macOs-go.jpg\",\"contentUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/09\\\/04210134\\\/macOs-go.jpg\",\"width\":1793,\"height\":1110},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u0622\u0645\u0648\u0632\u0634\u06cc\",\"item\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/category\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 Go \u0648 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0645\u062d\u0644\u06cc \u062f\u0631 macOS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/\",\"name\":\"\u0628\u0644\u0627\u06af ITPiran\",\"description\":\"\u0627\u062e\u0628\u0627\u0631 \u0648 \u0645\u0642\u0627\u0644\u0627\u062a \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#organization\",\"name\":\"\u0628\u0644\u0627\u06af \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646\",\"alternateName\":\"ITPIran Blog\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/cdn.itpiran.net\\\/2023\\\/12\\\/27150508\\\/cropped-ITPIRAN-BLOG-LOGO-2.png\",\"contentUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2023\\\/12\\\/27150508\\\/cropped-ITPIRAN-BLOG-LOGO-2.png\",\"width\":512,\"height\":512,\"caption\":\"\u0628\u0644\u0627\u06af \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646\"},\"image\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/person\\\/04ed27b919baca468a2273f8e4318f81\",\"name\":\"admin\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/en\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to install Go and set up a local development environment on macOS - ITPiran Blog","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:\/\/www.itpiran.net\/blog\/en\/tutorials\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\/","og_locale":"en_US","og_type":"article","og_title":"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 Go \u0648 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0645\u062d\u0644\u06cc \u062f\u0631 macOS - \u0628\u0644\u0627\u06af ITPiran","og_description":"\u0645\u0642\u062f\u0645\u0647 Go \u06cc\u06a9 \u0632\u0628\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0627\u0633\u062a \u06a9\u0647 \u0627\u0632 \u0646\u0627\u0627\u0645\u06cc\u062f\u06cc \u0628\u0647 \u0648\u062c\u0648\u062f \u0622\u0645\u062f\u0647 \u0627\u0633\u062a. \u062f\u0631 \u06af\u0648\u06af\u0644\u060c \u062a\u0648\u0633\u0639\u0647\u200c\u062f\u0647\u0646\u062f\u06af\u0627\u0646 \u0627\u0632&hellip;","og_url":"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\/","og_site_name":"\u0628\u0644\u0627\u06af ITPiran","article_published_time":"2024-09-04T17:45:29+00:00","og_image":[{"width":1793,"height":1110,"url":"https:\/\/cdn.itpiran.net\/2024\/09\/04210134\/macOs-go.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\/#article","isPartOf":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\/"},"author":{"name":"admin","@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/person\/04ed27b919baca468a2273f8e4318f81"},"headline":"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 Go \u0648 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0645\u062d\u0644\u06cc \u062f\u0631 macOS","datePublished":"2024-09-04T17:45:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\/"},"wordCount":119,"commentCount":0,"publisher":{"@id":"https:\/\/www.itpiran.net\/blog\/#organization"},"image":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.itpiran.net\/2024\/09\/04210134\/macOs-go.jpg","keywords":["Go","macOS","programming"],"articleSection":["\u0622\u0645\u0648\u0632\u0634\u06cc","\u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\/","url":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\/","name":"How to install Go and set up a local development environment on macOS - ITPiran Blog","isPartOf":{"@id":"https:\/\/www.itpiran.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\/#primaryimage"},"image":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.itpiran.net\/2024\/09\/04210134\/macOs-go.jpg","datePublished":"2024-09-04T17:45:29+00:00","breadcrumb":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\/#primaryimage","url":"https:\/\/cdn.itpiran.net\/2024\/09\/04210134\/macOs-go.jpg","contentUrl":"https:\/\/cdn.itpiran.net\/2024\/09\/04210134\/macOs-go.jpg","width":1793,"height":1110},{"@type":"BreadcrumbList","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-go-and-set-up-a-local-programming-environment-on-macos\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.itpiran.net\/blog\/"},{"@type":"ListItem","position":2,"name":"\u0622\u0645\u0648\u0632\u0634\u06cc","item":"https:\/\/www.itpiran.net\/blog\/category\/tutorials\/"},{"@type":"ListItem","position":3,"name":"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 Go \u0648 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0645\u062d\u0644\u06cc \u062f\u0631 macOS"}]},{"@type":"WebSite","@id":"https:\/\/www.itpiran.net\/blog\/#website","url":"https:\/\/www.itpiran.net\/blog\/","name":"ITPiran Blog","description":"Iranian Sustainable Trade News and Articles","publisher":{"@id":"https:\/\/www.itpiran.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.itpiran.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.itpiran.net\/blog\/#organization","name":"Sustainable Iranian Business Blog","alternateName":"ITPIran Blog","url":"https:\/\/www.itpiran.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdn.itpiran.net\/2023\/12\/27150508\/cropped-ITPIRAN-BLOG-LOGO-2.png","contentUrl":"https:\/\/cdn.itpiran.net\/2023\/12\/27150508\/cropped-ITPIRAN-BLOG-LOGO-2.png","width":512,"height":512,"caption":"\u0628\u0644\u0627\u06af \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646"},"image":{"@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/person\/04ed27b919baca468a2273f8e4318f81","name":"admin","url":"https:\/\/www.itpiran.net\/blog\/en\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/posts\/16078","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/comments?post=16078"}],"version-history":[{"count":2,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/posts\/16078\/revisions"}],"predecessor-version":[{"id":16081,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/posts\/16078\/revisions\/16081"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/media\/16079"}],"wp:attachment":[{"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/media?parent=16078"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/categories?post=16078"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/tags?post=16078"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}