{"id":3969,"date":"2013-09-03T05:56:21","date_gmt":"2013-09-02T19:56:21","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=3969"},"modified":"2013-09-03T05:56:21","modified_gmt":"2013-09-02T19:56:21","slug":"go-webserver-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/go-webserver-primer-tutorial\/","title":{"rendered":"Go Webserver Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Go\/Webserver\/Go_Webserver_Primer.jpg\"><img decoding=\"async\"  style=\"border: 15px solid pink;\"  style=\"float:left; border: 15px solid pink;\" alt=\"Go Install Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Go\/Webserver\/Go_Webserver_Primer.jpg\" title=\"Go Webserver Primer Tutorial\" \/><\/a><p class=\"wp-caption-text\">Go Webserver Primer Tutorial<\/p><\/div>\n<p>Did you wake up wanting to write your own Web Server?   No?   Well, what are WE to do with YOU?   <em>&#8220;Lefty?   Mugsy?   Priscilla?   Let &#8217;em &#8216;av it?    Yes, the web server, you &#8216;eard what oi said!   Sorry, you&#8217;re having lunch?&#8221;<\/em><\/p>\n<p>&#8230; four hours later &#8230;<\/p>\n<p><em>&#8220;Mugsy, what&#8217;s that triangular piece of paper &#8230; never mind &#8230; have you got that web server?&#8221;<\/em><\/p>\n<p>(Metallic tinkering sound)<\/p>\n<p><em>&#8220;You do know what a web server is, don&#8217;t you?  What&#8217;s that you&#8217;ve got there on that silver thing behind your back?&#8221;<\/em><\/p>\n<p><strike>(Metallic tinkering sound)<\/strike> &#8230; replaced by (Metallic sounds that are tinkering)<\/p>\n<p><em>&#8220;Lefty, do you know what is behind Mugsy&#8217;s back &#8230; and why have you got one of those triangular pieces <strike>of pap<\/strike> &#8230; oh, never mind.   Is that a link you want me to click?&#8221;<\/em><\/p>\n<p>.<\/p>\n<p>.<\/p>\n<p>.<\/p>\n<p>.<\/p>\n<p>.<\/p>\n<p>.<\/p>\n<p>.<\/p>\n<p>.<\/p>\n<p><a href='#showme' onclick=\" var xxx=document.getElementById('showme');  xxx.style.display='block'; var xxxd=document.getElementById('dshowme');  xxxd.style.display='block';\">V<\/a><\/p>\n<p><a href='#showme' style='color:pink;' onclick=\" var xxx=document.getElementById('showme');  xxx.style.display='block'; var xxxd=document.getElementById('dshowme');  xxxd.style.display='block';\">Welcome to Mugsy&#8217;s and Lefty&#8217;s personalized link<\/a><\/p>\n<div style=\"width: 380px; height: 260px; overflow: hidden\">\n<img id='showme' src='http:\/\/www.findaspider.org.au\/info\/images\/Recognizing nests.jpg' style='display:none; margin-left:-350px;' title='Thanks to http:\/\/www.findaspider.org.au\/ for the image' onclick=' window.open(\"http:\/\/www.findaspider.org.au\/\");'><\/img>\n<\/div>\n<p id='dshowme' style='display:none;'>Da da da da!   &#8230; or should that be &#8230; Do do, do do, do do, do do!<\/p>\n<p>Our tutorial today builds on previous <a target=_blank href=\"#gipt\">Go Install Primer Tutorial<\/a> as shown below.<\/p>\n<p>Link to downloadable Go programming source code for a rudimentary webserver (about animals) could be called <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Go\/Webserver\/webserver.go_GETME\">webserver.go<\/a> as you wish.<\/p>\n<p>Link to Go &#8220;spiritual home&#8221; at <a target=_blank title='Go at Google' href='http:\/\/code.google.com\/p\/go\/'>Google<\/a>.<\/p>\n<p>Link to really good Go tutorials at <a target=_blank title='Go tutorials at Google' href='http:\/\/tour.golang.org\/'>Google<\/a>.<\/p>\n<p>Link to Go 1.1 Google Open Source Blog is <a target=_blank title='Go Open Source Blog' href='http:\/\/google-opensource.blogspot.hu\/2013\/05\/go-11-is-released.html'>here<\/a>.<\/p>\n<p>Link to really good Go web information at  <a target=_blank title='Go web information at Google' href='http:\/\/golang.org\/doc\/articles\/wiki\/#tmp_3'>Google<\/a>.<\/p>\n<hr \/>\n<p id='gipt'>Previous <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Go\/\">Go Install Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Go\/\"><img decoding=\"async\" id='imgigmail' onmouseover=\"var xqw=this.src;  if (xqw.indexOf('5') != -1) { this.src = 'http:\/\/www.rjmprogramming.com.au\/Go\/Go_Google_Primer-0of.jpg'; } else if (xqw.indexOf('4') != -1) { this.src = 'http:\/\/www.rjmprogramming.com.au\/Go\/Go_Google_Primer-5of.jpg'; } else if (xqw.indexOf('3') != -1) { this.src = 'http:\/\/www.rjmprogramming.com.au\/Go\/Go_Google_Primer-4of.jpg'; }    else if (xqw.indexOf('2') != -1) { this.src = 'http:\/\/www.rjmprogramming.com.au\/Go\/Go_Google_Primer-3of.jpg'; } else if (xqw.indexOf('1') != -1) { this.src = 'http:\/\/www.rjmprogramming.com.au\/Go\/Go_Google_Primer-2of.jpg'; }  else { this.src = 'http:\/\/www.rjmprogramming.com.au\/Go\/Go_Google_Primer-1of.jpg'; } \"  style=\"border: 15px solid pink;\"  style=\"float:left; border: 15px solid pink;\" alt=\"Go Install Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Go\/Go_Google_Primer-3of.jpg\" title=\"Go Install Primer Tutorial (try twirling round bottom of image for a synopsis ... 'do the twirl now')\" \/><\/a><p class=\"wp-caption-text\">Go Install Primer Tutorial (try twirling round bottom of image for a synopsis ... 'do the twirl now')<\/p><\/div>\n<p>Go (by Google) gave me that feeling like you are just seeing the tip of the iceberg, again.   A friend kindly put me onto this as a programming language which is an alternative to OOP but not just a function call type of language.<\/p>\n<p>Here we just install it (on a Mac 64bit laptop with Mac OS X 10.7.5) and do the old &#8220;<a target=_blank title=\"Don't say I don't give you anything\" href='http:\/\/www.rjmprogramming.com.au\/Go\/hw.jpg'>Hello World<\/a>&#8220;, but we will explore more in tutorials to come, and in any case here we do 4 x &#8220;hello world&#8221; with 3 different programs.   Meanwhile, have a read from <a target=_blank title='Go (2009) information from Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/Go_%28programming_language%29'>Wikipedia<\/a> about it, below:<\/p>\n<blockquote><p>Go, otherwise known as Golang, is an open source, compiled, garbage-collected, concurrent system programming language. It was first designed and developed at Google Inc.[7] beginning in September 2007 by Robert Griesemer, Rob Pike, and Ken Thompson.[3]<\/p>\n<p>The language was officially announced in November 2009 and is now used in some of Google&#8217;s production systems.[8] Go&#8217;s &#8220;gc&#8221; compiler targets the Linux, Mac OS X, FreeBSD, OpenBSD, Plan 9, and Microsoft Windows operating systems and the i386, amd64, and ARM processor architectures.[9]<\/p><\/blockquote>\n<p>You can download go (2009) programming source codes and rename to <a target=_blank title='Hello World in go (2009)' href='http:\/\/www.rjmprogramming.com.au\/Go\/hello.go_GETME'>hello.go<\/a>,  <a target=_blank title='Hello World in go (2009)' href='http:\/\/www.rjmprogramming.com.au\/Go\/helloworld.go_GETME'>helloworld.go<\/a>,  <a target=_blank title='Hello World x 2 in go (2009)' href='http:\/\/www.rjmprogramming.com.au\/Go\/slice.go_GETME'>slice.go<\/a>.<\/p>\n<p>Link to Go &#8220;spiritual home&#8221; at <a target=_blank title='Go at Google' href='http:\/\/code.google.com\/p\/go\/'>Google<\/a>.<\/p>\n<p>Link to really good Go tutorials at <a target=_blank title='Go tutorials at Google' href='http:\/\/tour.golang.org\/'>Google<\/a>.<\/p>\n<p>Link to Go 1.1 Google Open Source Blog is <a target=_blank title='Go Open Source Blog' href='http:\/\/google-opensource.blogspot.hu\/2013\/05\/go-11-is-released.html'>here<\/a>.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d3121' onclick='var dv=document.getElementById(\"d3121\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?cat=42\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d3121' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr \/>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d3969' onclick='var dv=document.getElementById(\"d3969\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?cat=42\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d3969' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Did you wake up wanting to write your own Web Server? No? Well, what are WE to do with YOU? &#8220;Lefty? Mugsy? Priscilla? Let &#8217;em &#8216;av it? Yes, the web server, you &#8216;eard what oi said! Sorry, you&#8217;re having lunch?&#8221; &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/go-webserver-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,37],"tags":[51,507,525,997,1319,1419],"class_list":["post-3969","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-above-the-fold","tag-go","tag-google-go","tag-programming","tag-tutorial","tag-webserver"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/3969"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=3969"}],"version-history":[{"count":0,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/3969\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=3969"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=3969"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=3969"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}