{"id":576,"date":"2020-03-27T18:03:10","date_gmt":"2020-03-27T18:03:10","guid":{"rendered":"http:\/\/pjakey.com\/wp\/?p=576"},"modified":"2020-03-27T18:03:10","modified_gmt":"2020-03-27T18:03:10","slug":"go-as-in-golang","status":"publish","type":"post","link":"https:\/\/pjakey.com\/wp\/2020\/03\/27\/go-as-in-golang\/","title":{"rendered":"Go (as in GoLang)"},"content":{"rendered":"<h4>Environment<\/h4>\n<h6><code>GOPATH<\/code><\/h6>\n<p>Attempting to limit the scope of your Go env, you can define the follow to help you maintain tight control over your app.<\/p>\n<pre>GOPATH=\"$(pwd)\/vendor:$(pwd)\"\r\nGOBIN=\"$(pwd\/bin\"<\/pre>\n<h4>Modules<\/h4>\n<p><strong>Command:<\/strong> <code>go mod download<\/code><\/p>\n<p><strong>Requirement:<\/strong> <code>go-1.13+<\/code> (Note to self: I&#8217;ll have to double-check this)<\/p>\n<p><strong>Purpose: <\/strong>download go module dependencies<strong><br \/>\n<\/strong><\/p>\n<p><strong>Command:<\/strong> <code>go mod vendor<\/code><\/p>\n<p><strong>Requirement:<\/strong> <code>go-1.13+<\/code> (Note to self: I&#8217;ll have to double-check this)<\/p>\n<p><strong>Purpose:<\/strong> create a vendor folder in the main module&#8217;s root folder and copy all dependencies into it. After this you may pass <code>-mod=vendor<\/code> param to the <code>go<\/code> tool.\u00a0 Dependencies from the vendor folder will be used to build your app.<\/p>\n<p>*\u00a0 Despite what others may agree or disagree with, I&#8217;m calling it golang because I feel that it really helps search engines and human know they&#8217;re looking at the programming language, Go, and not trying to find search results for just &#8220;go&#8221;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Environment GOPATH Attempting to limit the scope of your Go env, you can define the follow to help you maintain tight control over your app. GOPATH=&#8221;$(pwd)\/vendor:$(pwd)&#8221; GOBIN=&#8221;$(pwd\/bin&#8221; Modules Command: go mod download Requirement: go-1.13+ (Note to self: I&#8217;ll have to double-check this) Purpose: download go module dependencies Command: go mod vendor Requirement: go-1.13+ (Note to<span class=\"excerpt-ellipsis\">&#8230;<\/span><\/p>\n<p><a class=\"more-link\" href=\"https:\/\/pjakey.com\/wp\/2020\/03\/27\/go-as-in-golang\/\" itemprop=\"url\">Continue Reading<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-576","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/pjakey.com\/wp\/wp-json\/wp\/v2\/posts\/576","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pjakey.com\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pjakey.com\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pjakey.com\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pjakey.com\/wp\/wp-json\/wp\/v2\/comments?post=576"}],"version-history":[{"count":1,"href":"https:\/\/pjakey.com\/wp\/wp-json\/wp\/v2\/posts\/576\/revisions"}],"predecessor-version":[{"id":577,"href":"https:\/\/pjakey.com\/wp\/wp-json\/wp\/v2\/posts\/576\/revisions\/577"}],"wp:attachment":[{"href":"https:\/\/pjakey.com\/wp\/wp-json\/wp\/v2\/media?parent=576"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pjakey.com\/wp\/wp-json\/wp\/v2\/categories?post=576"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pjakey.com\/wp\/wp-json\/wp\/v2\/tags?post=576"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}