{"id":84,"date":"2024-09-03T10:12:50","date_gmt":"2024-09-03T03:12:50","guid":{"rendered":"https:\/\/gotutorial.org\/?page_id=84"},"modified":"2024-10-05T10:39:46","modified_gmt":"2024-10-05T03:39:46","slug":"what-is-go","status":"publish","type":"page","link":"https:\/\/www.gotutorial.org\/go-tutorial\/what-is-go\/","title":{"rendered":"What is Go"},"content":{"rendered":"\n<p>Go is a statically typed, compiled high-level programming language.<\/p>\n\n\n\n<p class=\"note\">Go is often called Golang due to its original domain name, golang.org, but its proper name is Go. The <a href=\"https:\/\/go.dev\/\" target=\"_blank\" rel=\"noreferrer noopener\">official Go website now is go.dev<\/a>.<\/p>\n\n\n\n<p>Go was created by <a href=\"https:\/\/en.wikipedia.org\/wiki\/Robert_Griesemer\">Robert Griesemer<\/a>,&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Rob_Pike\">Rob Pike<\/a>, and&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Ken_Thompson\">Ken Thompson<\/a> at Google in 2007 to address the challenges of handling large codebases and concurrency in existing languages such as C++ and Java.<\/p>\n\n\n\n<p>Go focuses on simplicity, speed, and developer productivity.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Go language features<\/h2>\n\n\n\n<p>The following are the main features of the Go programming language.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Statically typed language<\/h3>\n\n\n\n<p>Go requires <a href=\"https:\/\/gotutorial.org\/go-tutorial\/go-variables\/\">variables<\/a> to have particular types determined at compile-time. This helps catch errors early and improve performance.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Compiled language<\/h3>\n\n\n\n<p>Go code can be compiled directly to native machine code, which can run directly on the operating system without using a virtual machine. <\/p>\n\n\n\n<p>This means that Go programs can execute faster with lower resource usage than other languages that rely on a virtual machine like Java or C#.<\/p>\n\n\n\n<p>Additionally, Go code can be <strong>compiled quickly<\/strong> even with a large codebase. This allows for rapid development and quick iteration cycles.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Cross-platform<\/h3>\n\n\n\n<p>A single Go codebase can be compiled for multiple platforms including Windows, Linux, and macOS. This reduces the efforts of developing cross-platform applications.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Garbage collection<\/h3>\n\n\n\n<p>Unlike unsafe languages such as C\/C++, Go automatically manages memory so you don&#8217;t have to manage it manually. This reduces the risk of memory leaks and errors related to manual memory management.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Built-in concurrency<\/h3>\n\n\n\n<p>Go supports concurrency out of the box with <a href=\"https:\/\/gotutorial.org\/go-tutorial\/goroutines\/\">goroutines<\/a> and <a href=\"https:\/\/gotutorial.org\/go-tutorial\/go-channels\/\">channels<\/a>, allowing functions to run concurrently.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Simplicity<\/h3>\n\n\n\n<p>Go language has a simple and clean syntax, making learning easy.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is Go used for<\/h2>\n\n\n\n<p>Go is widely used for the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Cloud and server-side applications<\/li>\n\n\n\n<li>Command-line interfaces<\/li>\n\n\n\n<li>Web applications<\/li>\n<\/ul>\n<div class=\"helpful-block-content\" data-title=\"\">\n\t<div class=\"wth-question\">Was this tutorial helpful?<\/div>\n\t<div class=\"wth-thumbs\">\n\t\t<button\n\t\t\tdata-post=\"84\"\n\t\t\tdata-post-url=\"https:\/\/www.gotutorial.org\/go-tutorial\/what-is-go\/\"\n\t\t\tdata-post-title=\"What is Go\"\n\t\t\tdata-response=\"1\"\n\t\t\tclass=\"wth-btn-rounded wth-yes-btn\"\n\t\t>\n\t\t\t<svg\n\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\tfill=\"none\"\n\t\t\t\tstroke=\"currentColor\"\n\t\t\t\tstroke-width=\"2\"\n\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\tclass=\"feather feather-thumbs-up block w-full h-full\"\n\t\t\t>\n\t\t\t\t<path\n\t\t\t\t\td=\"M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3\"\n\t\t\t\t><\/path>\n\t\t\t<\/svg>\n\t\t\t<span class=\"sr-only\"> Yes <\/span>\n\t\t<\/button>\n\n\t\t<button\n\t\t\tdata-response=\"0\"\n\t\t\tdata-post=\"84\"\n\t\t\tdata-post-url=\"https:\/\/www.gotutorial.org\/go-tutorial\/what-is-go\/\"\n\t\t\tdata-post-title=\"What is Go\"\n\t\t\tclass=\"wth-btn-rounded wth-no-btn\"\n\t\t>\n\t\t\t<svg\n\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\tfill=\"none\"\n\t\t\t\tstroke=\"currentColor\"\n\t\t\t\tstroke-width=\"2\"\n\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t>\n\t\t\t\t<path\n\t\t\t\t\td=\"M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17\"\n\t\t\t\t><\/path>\n\t\t\t<\/svg>\n\t\t\t<span class=\"sr-only\"> No <\/span>\n\t\t<\/button>\n\t<\/div>\n\n\t<div class=\"wth-form hidden\">\n\t\t<div class=\"wth-form-wrapper\">\n\t\t\t<div class=\"wth-title\"><\/div>\n\t\t\t<textarea class=\"wth-message\"><\/textarea>\n\t\t\t<input type=\"button\" name=\"wth-submit\" class=\"wth-btn wth-btn-submit\" id=\"wth-submit\" \/>\n\t\t\t<input type=\"button\" class=\"wth-btn wth-btn-cancel\" value=\"Cancel\" \/>\n\t\t<\/div>\n\t<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This page gives you a quick introduction to Go programming language (Golang) and more importantly what you can build using the Go language.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":10,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-84","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.gotutorial.org\/wp-json\/wp\/v2\/pages\/84","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gotutorial.org\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.gotutorial.org\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.gotutorial.org\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gotutorial.org\/wp-json\/wp\/v2\/comments?post=84"}],"version-history":[{"count":12,"href":"https:\/\/www.gotutorial.org\/wp-json\/wp\/v2\/pages\/84\/revisions"}],"predecessor-version":[{"id":493,"href":"https:\/\/www.gotutorial.org\/wp-json\/wp\/v2\/pages\/84\/revisions\/493"}],"up":[{"embeddable":true,"href":"https:\/\/www.gotutorial.org\/wp-json\/wp\/v2\/pages\/10"}],"wp:attachment":[{"href":"https:\/\/www.gotutorial.org\/wp-json\/wp\/v2\/media?parent=84"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}