{"id":31082,"date":"2019-10-31T21:39:21","date_gmt":"2019-10-31T18:39:21","guid":{"rendered":"https:\/\/prohoster.info\/blog\/zachem-vam-uchit-go\/"},"modified":"2019-10-31T21:39:21","modified_gmt":"2019-10-31T18:39:21","slug":"zachem-vam-uchit-go","status":"publish","type":"post","link":"https:\/\/prohoster.info\/sv\/blog\/news\/zachem-vam-uchit-go","title":{"rendered":"Varf\u00f6r l\u00e4r du dig Go","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><img decoding=\"async\" alt=\"Varf\u00f6r l\u00e4r du dig Go\" src=\"\/wp-content\/uploads\/2019\/04\/76856ea21f876fe925bcb0c5432c777c.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/ashleymcnamara\/gophers\">Bildk\u00e4lla<\/a><\/noindex><\/p>\n<p><\/p>\n<p>Go \u00e4r ett relativt ungt men popul\u00e4rt programmeringsspr\u00e5k. Enligt\u00a0<noindex><a rel=\"nofollow\" href=\"https:\/\/insights.stackoverflow.com\/survey\/2018\/\">Stack Overflow-unders\u00f6kningen<\/a><\/noindex> fick Golang tredje plats i rankingen av programmeringsspr\u00e5k som utvecklare skulle vilja l\u00e4ra sig. I den h\u00e4r artikeln f\u00f6rs\u00f6ker vi f\u00f6rst\u00e5 orsakerna till GOs popularitet och tittar p\u00e5 var detta spr\u00e5k anv\u00e4nds och varf\u00f6r det \u00e4r v\u00e4rt att l\u00e4ra sig \u00f6verhuvudtaget.<\/p>\n<p><noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<h3 id=\"nemnogo-istorii\">Lite historia<\/h3>\n<p><\/p>\n<p>Programmeringsspr\u00e5ket Go skapades av Google. Faktum \u00e4r att dess fullst\u00e4ndiga namn Golang \u00e4r en avledning av \"Google language\". Trots att spr\u00e5ket kallades ungt vid lansering fyller det redan tio \u00e5r i \u00e5r.<\/p>\n<p><\/p>\n<p>M\u00e5let som skaparna av Go hade var att utveckla ett enkelt och effektivt programmeringsspr\u00e5k som kunde anv\u00e4ndas f\u00f6r att skapa kvalitativ mjukvara. Rob Pike, en av skaparna av Go, meddelade att Go utvecklades f\u00f6r programmerare p\u00e5 f\u00f6retaget som nyligen avslutat sina studier och k\u00e4nde sig bekanta med Java, C, C++ eller Python. Go \u00e4r f\u00f6r dem ett spr\u00e5k som \u00e4r enkelt att snabbt f\u00f6rst\u00e5 och som man snabbt v\u00e4njer sig vid.<\/p>\n<p><\/p>\n<p>I b\u00f6rjan var det ett verktyg inom Google, men med tiden kom det ut fr\u00e5n f\u00f6retagets sf\u00e4r och blev tillg\u00e4ngligt f\u00f6r allm\u00e4nheten.<\/p>\n<p><\/p>\n<h3 id=\"preimuschestva-yazyka\">F\u00f6rdelar med spr\u00e5ket<\/h3>\n<p><\/p>\n<p>Golang har m\u00e5nga f\u00f6rdelar, b\u00e5de k\u00e4nda och mindre k\u00e4nda.<\/p>\n<p><\/p>\n<p><strong>Enkelhet.<\/strong> Detta var faktiskt den huvudsakliga m\u00e5ls\u00e4ttningen med spr\u00e5kets skapande, och den har uppn\u00e5tts. Go har en ganska enkel syntax (med vissa undantag), vilket g\u00f6r att applikationer kan utvecklas snabbare \u00e4n p\u00e5 vissa andra spr\u00e5k. H\u00e4r finns tv\u00e5 intressanta punkter.<\/p>\n<p><\/p>\n<p>F\u00f6r det f\u00f6rsta kan Golang snabbt l\u00e4ras av en total nyb\u00f6rjare inom programmering \u2013 n\u00e5gon som inte vet n\u00e5got spr\u00e5k och bara planerar att bli utvecklare. Man kan s\u00e4ga att Go \u00e4r n\u00e4stan lika enkelt (relativt sett, f\u00f6rst\u00e5s) som PHP eller till och med Pascal, men lika kraftfullt som C++.<\/p>\n<p><\/p>\n<p>F\u00f6r det andra kan Go bem\u00e4stras av en redan \"etablerad programmerare\", n\u00e5gon som redan k\u00e4nner till ett eller flera spr\u00e5k. Oftast l\u00e4r sig utvecklare Go efter att ha beh\u00e4rskat Python eller PHP. D\u00e4refter anv\u00e4nder vissa programmerare framg\u00e5ngsrikt paret Python\/Go eller PHP\/Go.<\/p>\n<p><\/p>\n<p><strong>Ett stort antal bibliotek.<\/strong> Om du saknar n\u00e5gon funktionalitet i Go, kan du anv\u00e4nda ett av de m\u00e5nga biblioteken f\u00f6r att utf\u00f6ra den n\u00f6dv\u00e4ndiga uppgiften. Go har ocks\u00e5 en annan f\u00f6rdel \u2013 det \u00e4r enkelt att interagera med C-bibliotek. Det finns till och med uppfattningen att Go-bibliotek \u00e4r omslag f\u00f6r C-bibliotek.<\/p>\n<p><\/p>\n<p><strong>Kodens renhet.<\/strong> Go-kompilatorn g\u00f6r det m\u00f6jligt att h\u00e5lla koden \"ren\". Till exempel anses oanv\u00e4nda variabler vara ett kompilationsfel. I Go l\u00f6ses en stor del av formateringsproblemen. Detta g\u00f6rs till exempel med hj\u00e4lp av programmet gofmt vid sparande eller kompilering. Formateringen justeras automatiskt. Mer om detta kan l\u00e4sas i handledningen. <noindex>Effektiv<\/noindex>.<\/p>\n<p><\/p>\n<p><strong>Statisk typning.<\/strong> \u00c4nnu en f\u00f6rdel med Go som minskar risken f\u00f6r felaktigheter fr\u00e5n utvecklaren. Visst kan en programmerare som \u00e4r van vid dynamisk typning bli irriterad under de f\u00f6rsta dagarna \u00f6ver att beh\u00f6va deklarera typ f\u00f6r varje variabel och funktion, liksom f\u00f6r allt annat. Men efter ett tag blir det tydligt att detta har m\u00e5nga f\u00f6rdelar.<\/p>\n<p><\/p>\n<p><strong><noindex><a rel=\"nofollow\" href=\"https:\/\/godoc.org\/\">GoDoc<\/a><\/noindex><\/strong>. Ett verktyg som f\u00f6renklar dokumentationen av koden avsev\u00e4rt. En stor f\u00f6rdel med GoDoc \u00e4r att det inte anv\u00e4nder ytterligare spr\u00e5k som JavaDoc, PHPDoc eller JSDoc. Verktyget anv\u00e4nder maximal information som det extraherar fr\u00e5n den dokumenterade koden.<\/p>\n<p><\/p>\n<p><b>Underh\u00e5ll av kod.<\/b> Den \u00e4r l\u00e4tt att underh\u00e5lla tack vare den enkla och koncisa syntaksen. Allt detta \u00e4r ett arv fr\u00e5n Google. Eftersom f\u00f6retaget har en enorm m\u00e4ngd kod f\u00f6r olika programvaruprodukter, samt tiotusentals utvecklare som analyserar den, uppst\u00e5r problemet med underh\u00e5ll. Koden m\u00e5ste vara f\u00f6rst\u00e5elig f\u00f6r alla som arbetar med den, v\u00e4l dokumenterad och koncis. Detta \u00e4r m\u00f6jligt med Go.<\/p>\n<p><\/p>\n<p>Det finns inga klasser i Golang (det finns strukturer, struct), ingen st\u00f6d f\u00f6r arv, vilket avsev\u00e4rt f\u00f6renklar kod\u00e4ndringar. Plus, det finns inga undantag, annoteringar osv.<\/p>\n<p><\/p>\n<h3 id=\"chto-mozhno-napisat-nanbspgo\">Vad kan man skriva i Go<\/h3>\n<p><\/p>\n<p>N\u00e4stan allt, med undantag f\u00f6r vissa aspekter (till exempel utveckling relaterad till maskininl\u00e4rning \u2013 h\u00e4r passar fortfarande Python b\u00e4ttre med l\u00e5g niv\u00e5 optimeringar p\u00e5 C\/C++ och CUDA).<\/p>\n<p><\/p>\n<p>All other aspects can be written about, especially in relation to web services. Additionally, Go is suitable for developing applications for both end users and for creating daemons, UI, and is suitable for cross-platform applications and services.<\/p>\n<p><\/p>\n<h3 id=\"vostrebovannost-golang\">Demand for Golang<\/h3>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"Varf\u00f6r l\u00e4r du dig Go\" src=\"\/wp-content\/uploads\/2019\/04\/225ef16982817979250a6a8a9f5fe7cb.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nOver time, the language is becoming increasingly in demand. In addition to the companies shown in the image above, companies like Mail.ru Group, Avito, Ozon, Lamoda, BBC, Canonical, and others are working with Golang.<\/p>\n<p><\/p>\n<p>\"We decided to scale the business; it is essential for us to build a fundamentally new technological platform that ensures rapid product development. We are betting on Go due to its speed and reliability, and most importantly, the community of programmers that uses it,\" said representatives of Ozon in 2018 after the company decided to switch to Golang.<\/p>\n<p><\/p>\n<p>But what about earnings? The salary of a Go developer last year averaged 60-140 thousand rubles according to \"My Circle.\" Compared to 2017, this figure increased by 8.3%. In 2019, the growth is expected to continue, as many companies need Golang developers. <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/moikrug\/blog\/420391\/\">data<\/a><\/noindex> There is no stopping the development of Golang. The demand for good specialists who know this language will only grow, making it easy for specialists (both beginners and pros) to find work. In fact, this statement is relevant even now, as there is a constant shortage of developers in the IT market.<\/p>\n<p><\/p>\n<h3 id=\"chto-dalshe\">Vad h\u00e4nder h\u00e4rn\u00e4st?<\/h3>\n<p><\/p>\n<p>Go is great for both novice programmers and professionals who already know one or more programming languages. Virtually any programmer can learn it or retrain.<\/p>\n<p><\/p>\n<p>This article was prepared in collaboration with the instructor<\/p>\n<p><\/p>\n<p>of the Golang course <noindex><a rel=\"nofollow\" href=\"https:\/\/geekbrains.ru\/geek_university\/golang\">at GeekBrains, Sergey Kruchinin, for which we extend our heartfelt thanks!<\/a><\/noindex> \ud83e\udd47Why you should learn Go | ProHoster<\/p>\n<p>K\u00e4lla: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/mailru\/blog\/446914\/\">habr.com<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 Go\u00a0\u2014 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u043e\u043b\u043e\u0434\u043e\u0439, \u043d\u043e\u00a0\u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041f\u043e\u00a0\u0434\u0430\u043d\u043d\u044b\u043c \u043e\u043f\u0440\u043e\u0441\u0430 Stack Overflow, \u0438\u043c\u0435\u043d\u043d\u043e Golang \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0442\u0440\u0435\u0442\u044c\u0435 \u043c\u0435\u0441\u0442\u043e \u0432\u00a0\u0440\u0435\u0439\u0442\u0438\u043d\u0433\u0435 \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u043e\u0442\u0435\u043b\u0438\u00a0\u0431\u044b \u043e\u0441\u0432\u043e\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438. \u0412\u00a0\u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b\u00a0\u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432\u00a0\u043f\u0440\u0438\u0447\u0438\u043d\u0430\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u0438\u00a0Go, \u0430\u00a0\u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0433\u0434\u0435 \u044d\u0442\u043e\u0442 \u044f\u0437\u044b\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438\u00a0\u043f\u043e\u0447\u0435\u043c\u0443 \u0435\u0433\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u0441\u0442\u043e\u0438\u0442 \u0438\u0437\u0443\u0447\u0430\u0442\u044c. \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u042f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f\u00a0Go \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0435\u0439 Google. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0435\u0433\u043e \u043f\u043e\u043b\u043d\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 Golang\u00a0\u2014 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u043e\u0435 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":23053,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-31082","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.5 - aioseo.com -->\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/sv\/blog\/news\/zachem-vam-uchit-go\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.5\" \/>\n\t\t<meta property=\"og:locale\" content=\"sv_SE\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0417\u0430\u0447\u0435\u043c \u0432\u0430\u043c \u0443\u0447\u0438\u0442\u044c Go | ProHoster\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/sv\/blog\/news\/zachem-vam-uchit-go\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-10-31T18:39:21+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T18:39:21+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Varf\u00f6r ska ni l\u00e4ra er Go | ProHoster","description":"","canonical_url":"https:\/\/prohoster.info\/sv\/blog\/news\/zachem-vam-uchit-go","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"sv_SE","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0417\u0430\u0447\u0435\u043c \u0432\u0430\u043c \u0443\u0447\u0438\u0442\u044c Go | ProHoster","og:url":"https:\/\/prohoster.info\/sv\/blog\/news\/zachem-vam-uchit-go","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-10-31T18:39:21+00:00","article:modified_time":"2019-10-31T18:39:21+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"31082","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-21 04:26:19","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 14:36:29","updated":"2026-01-21 04:26:19","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/sv\/wp-json\/wp\/v2\/posts\/31082","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/sv\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/sv\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sv\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sv\/wp-json\/wp\/v2\/comments?post=31082"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/sv\/wp-json\/wp\/v2\/posts\/31082\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sv\/wp-json\/wp\/v2\/media\/23053"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/sv\/wp-json\/wp\/v2\/media?parent=31082"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/sv\/wp-json\/wp\/v2\/categories?post=31082"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/sv\/wp-json\/wp\/v2\/tags?post=31082"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}