<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;D04DQn87fyp7ImA9WhVSEE8.&quot;"><id>tag:blogger.com,1999:blog-8110657754519829885</id><updated>2012-03-06T01:26:13.107-08:00</updated><title>GoLang Tutorials</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://golangtutorials.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://golangtutorials.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Sathish VJ</name><uri>http://www.blogger.com/profile/15718521031646368740</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>37</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/GoLangTutorials" /><feedburner:info uri="golangtutorials" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>GoLangTutorials</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><entry gd:etag="W/&quot;CkUFRn07eSp7ImA9WhRVF0U.&quot;"><id>tag:blogger.com,1999:blog-8110657754519829885.post-8017916041157681803</id><published>2012-01-05T04:48:00.000-08:00</published><updated>2012-01-16T22:03:37.301-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-16T22:03:37.301-08:00</app:edited><title>Jobs and opportunities in the Go world</title><link rel="replies" type="application/atom+xml" href="http://golangtutorials.blogspot.com/feeds/8017916041157681803/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://golangtutorials.blogspot.com/2012/01/jobs-and-opportunities-in-go-world.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/8017916041157681803?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/8017916041157681803?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/GoLangTutorials/~3/uy-5W9W9MUo/jobs-and-opportunities-in-go-world.html" title="Jobs and opportunities in the Go world" /><author><name>Sathish VJ</name><uri>http://www.blogger.com/profile/15718521031646368740</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">
Other topics in this series - Table of Contents

5th January 2012: I get quite a few visitors on these pages everyday and given that Go version 1 will become official soon, even though there are just a few job opportunities now, I foresee a spurt in the future.  To assist those who are learning to also find available opportunities, I wanted to maintain a list of the early job postings.  If you 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/u9ZbaFKFOyUIIO6sgENYIULbG5Y/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/u9ZbaFKFOyUIIO6sgENYIULbG5Y/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/u9ZbaFKFOyUIIO6sgENYIULbG5Y/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/u9ZbaFKFOyUIIO6sgENYIULbG5Y/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/GoLangTutorials/~4/uy-5W9W9MUo" height="1" width="1"/&gt;</content><feedburner:origLink>http://golangtutorials.blogspot.com/2012/01/jobs-and-opportunities-in-go-world.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUIDQXk9fSp7ImA9WhRWFUo.&quot;"><id>tag:blogger.com,1999:blog-8110657754519829885.post-2739115976194051939</id><published>2012-01-01T13:53:00.000-08:00</published><updated>2012-01-02T23:59:30.765-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-02T23:59:30.765-08:00</app:edited><title>Interfaces in Go - Part 2: Aiding adaptable, evolutionary design</title><link rel="replies" type="application/atom+xml" href="http://golangtutorials.blogspot.com/feeds/2739115976194051939/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://golangtutorials.blogspot.com/2012/01/interfaces-in-go-part-2-aiding.html#comment-form" title="10 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/2739115976194051939?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/2739115976194051939?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/GoLangTutorials/~3/RALYsgz149A/interfaces-in-go-part-2-aiding.html" title="Interfaces in Go - Part 2: Aiding adaptable, evolutionary design" /><author><name>Sathish VJ</name><uri>http://www.blogger.com/profile/15718521031646368740</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>10</thr:total><content type="html">
Other topics in this series - Table of Contents



In discussing interfaces in the first post, I had started off with a familiar example from OOP - a Shaper interface and a couple of concrete shapes that implemented the interface.  But as Rob pointed out in this this groups thread, "Go's interfaces aren't a variant on Java or C# interfaces, they're much more. They are a key to large-scale 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/8Wwutbd3a43MMz1lrcx3Vxb-KJ4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8Wwutbd3a43MMz1lrcx3Vxb-KJ4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/8Wwutbd3a43MMz1lrcx3Vxb-KJ4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8Wwutbd3a43MMz1lrcx3Vxb-KJ4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/GoLangTutorials/~4/RALYsgz149A" height="1" width="1"/&gt;</content><feedburner:origLink>http://golangtutorials.blogspot.com/2012/01/interfaces-in-go-part-2-aiding.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUQFRXg-fCp7ImA9WhRREEQ.&quot;"><id>tag:blogger.com,1999:blog-8110657754519829885.post-6871294449585921014</id><published>2011-11-22T14:54:00.000-08:00</published><updated>2011-11-23T16:08:34.654-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-23T16:08:34.654-08:00</app:edited><title>OAuth2: 3-legged authorization in a Go web application</title><link rel="replies" type="application/atom+xml" href="http://golangtutorials.blogspot.com/feeds/6871294449585921014/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://golangtutorials.blogspot.com/2011/11/oauth2-3-legged-authorization-in-go-web.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/6871294449585921014?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/6871294449585921014?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/GoLangTutorials/~3/azwZzJDdAZg/oauth2-3-legged-authorization-in-go-web.html" title="OAuth2: 3-legged authorization in a Go web application" /><author><name>Sathish VJ</name><uri>http://www.blogger.com/profile/15718521031646368740</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-TcjuEN3yGgA/TswJJLWvdOI/AAAAAAAABNs/0ckcK6mtlaU/s72-c/googleApiConsole.png" height="72" width="72" /><thr:total>2</thr:total><content type="html">
Other topics in this series - Table of Contents


OAuth is currently the recommended standard for user authorization.  I’ll limit this write up to just examples of using the OAuth standard with Google using Go.  However there are a lot of good write ups on the web that explains the process well.  

One of the major uses of OAuth is that a user can authorize your application, using a 3-legged 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Y9JXTt6BYI3O7CIb7JtEJp5Vx4E/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Y9JXTt6BYI3O7CIb7JtEJp5Vx4E/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Y9JXTt6BYI3O7CIb7JtEJp5Vx4E/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Y9JXTt6BYI3O7CIb7JtEJp5Vx4E/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/GoLangTutorials/~4/azwZzJDdAZg" height="1" width="1"/&gt;</content><feedburner:origLink>http://golangtutorials.blogspot.com/2011/11/oauth2-3-legged-authorization-in-go-web.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0UBR3g6eyp7ImA9WhRSFks.&quot;"><id>tag:blogger.com,1999:blog-8110657754519829885.post-7627832878054999862</id><published>2011-11-18T15:41:00.001-08:00</published><updated>2011-11-18T16:07:36.613-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-18T16:07:36.613-08:00</app:edited><title>Using an external api in a Go AppEngine program - urlshortener from Google APIs</title><link rel="replies" type="application/atom+xml" href="http://golangtutorials.blogspot.com/feeds/7627832878054999862/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://golangtutorials.blogspot.com/2011/11/using-external-api-in-go-appengine.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/7627832878054999862?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/7627832878054999862?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/GoLangTutorials/~3/BXwl2lHzAro/using-external-api-in-go-appengine.html" title="Using an external api in a Go AppEngine program - urlshortener from Google APIs" /><author><name>Sathish VJ</name><uri>http://www.blogger.com/profile/15718521031646368740</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">Other topics in this series - Table of Contents


This tutorial is almost exactly the same as http://golangtutorials.blogspot.com/2011/11/using-external-api-in-go-web-program.html, except that we will be doing the same program for the AppEngine.  There are a few differences on how to make it work, so I shall, even at the cost of repetition for those who are coming directly to this page for 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/0KYnV5sLhJY2tjLgETUe5lwuXa8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0KYnV5sLhJY2tjLgETUe5lwuXa8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/0KYnV5sLhJY2tjLgETUe5lwuXa8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0KYnV5sLhJY2tjLgETUe5lwuXa8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/GoLangTutorials/~4/BXwl2lHzAro" height="1" width="1"/&gt;</content><feedburner:origLink>http://golangtutorials.blogspot.com/2011/11/using-external-api-in-go-appengine.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0IAQ3o-fSp7ImA9WhRSFks.&quot;"><id>tag:blogger.com,1999:blog-8110657754519829885.post-2019389161072872997</id><published>2011-11-18T12:07:00.000-08:00</published><updated>2011-11-18T16:12:22.455-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-18T16:12:22.455-08:00</app:edited><title>Using an external api in a Go web program - urlshortener from Google APIs</title><link rel="replies" type="application/atom+xml" href="http://golangtutorials.blogspot.com/feeds/2019389161072872997/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://golangtutorials.blogspot.com/2011/11/using-external-api-in-go-web-program.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/2019389161072872997?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/2019389161072872997?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/GoLangTutorials/~3/LEXA-a6bnNg/using-external-api-in-go-web-program.html" title="Using an external api in a Go web program - urlshortener from Google APIs" /><author><name>Sathish VJ</name><uri>http://www.blogger.com/profile/15718521031646368740</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">Other topics in this series - Table of Contents

In this tutorial, we will look at how to use an external API within our go program.  The one that we shall use is the URL Shortener API.  You can try its present functionality at http://goo.gl/.  Enter a URL like http://golangtutorials.blogspot.com/ and you will see a shorter URL returned, which is much easier to embed, say, in a service like 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/OaLcb2eDzX-u4E3bY_FWqtzb44c/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OaLcb2eDzX-u4E3bY_FWqtzb44c/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/OaLcb2eDzX-u4E3bY_FWqtzb44c/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OaLcb2eDzX-u4E3bY_FWqtzb44c/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/GoLangTutorials/~4/LEXA-a6bnNg" height="1" width="1"/&gt;</content><feedburner:origLink>http://golangtutorials.blogspot.com/2011/11/using-external-api-in-go-web-program.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0UGQXY_cCp7ImA9WhRSFk4.&quot;"><id>tag:blogger.com,1999:blog-8110657754519829885.post-2558848686890106963</id><published>2011-11-15T10:45:00.000-08:00</published><updated>2011-11-18T10:00:20.848-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-18T10:00:20.848-08:00</app:edited><title>Go Templates - Part 3 - Template Sets</title><link rel="replies" type="application/atom+xml" href="http://golangtutorials.blogspot.com/feeds/2558848686890106963/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://golangtutorials.blogspot.com/2011/11/go-templates-part-3-template-sets.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/2558848686890106963?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/2558848686890106963?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/GoLangTutorials/~3/B53pzpR_oPk/go-templates-part-3-template-sets.html" title="Go Templates - Part 3 - Template Sets" /><author><name>Sathish VJ</name><uri>http://www.blogger.com/profile/15718521031646368740</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">Other topics in this series - Table of Contents
See also: Go Templates - Part 1
See also: Go Templates - Part 2



Template sets allow you to group together related templates in one group.  For example if a web page had a header, body, and footer, these could be defined within one text file.  This could then could be read into your program with one call which will parse all the template 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Rf41sSiWZJXv58UMhVRx2ZLhu5E/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Rf41sSiWZJXv58UMhVRx2ZLhu5E/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Rf41sSiWZJXv58UMhVRx2ZLhu5E/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Rf41sSiWZJXv58UMhVRx2ZLhu5E/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/GoLangTutorials/~4/B53pzpR_oPk" height="1" width="1"/&gt;</content><feedburner:origLink>http://golangtutorials.blogspot.com/2011/11/go-templates-part-3-template-sets.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0EFSX84eSp7ImA9WhRTEUQ.&quot;"><id>tag:blogger.com,1999:blog-8110657754519829885.post-9103079306402990800</id><published>2011-10-31T16:03:00.000-07:00</published><updated>2011-11-01T18:00:18.131-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-01T18:00:18.131-07:00</app:edited><title>gotest - unit testing and benchmarking Go programs</title><link rel="replies" type="application/atom+xml" href="http://golangtutorials.blogspot.com/feeds/9103079306402990800/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://golangtutorials.blogspot.com/2011/10/gotest-unit-testing-and-benchmarking-go.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/9103079306402990800?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/9103079306402990800?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/GoLangTutorials/~3/dL8BRFo1ee8/gotest-unit-testing-and-benchmarking-go.html" title="gotest - unit testing and benchmarking Go programs" /><author><name>Sathish VJ</name><uri>http://www.blogger.com/profile/15718521031646368740</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">Other topics in this series - Table of Contents

The Go installation that you have comes with a unit testing package called testing and a tool called gotest that you can use to write unit tests.  This unit testing framework, like frameworks in other languages, allow you to write any number of tests that you can run frequently to check the correctness of your code in small units.  You can also 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2fQXQMtBoKf_L120TzU8zlObS2I/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2fQXQMtBoKf_L120TzU8zlObS2I/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/2fQXQMtBoKf_L120TzU8zlObS2I/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2fQXQMtBoKf_L120TzU8zlObS2I/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/GoLangTutorials/~4/dL8BRFo1ee8" height="1" width="1"/&gt;</content><feedburner:origLink>http://golangtutorials.blogspot.com/2011/10/gotest-unit-testing-and-benchmarking-go.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck8HQ3c-eip7ImA9WhRTEk0.&quot;"><id>tag:blogger.com,1999:blog-8110657754519829885.post-3923118762725422253</id><published>2011-10-30T20:11:00.000-07:00</published><updated>2011-11-01T19:27:12.952-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-01T19:27:12.952-07:00</app:edited><title>Analysing a Google AppEnginge for Go program</title><link rel="replies" type="application/atom+xml" href="http://golangtutorials.blogspot.com/feeds/3923118762725422253/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://golangtutorials.blogspot.com/2011/10/analysing-google-appenginge-for-go.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/3923118762725422253?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/3923118762725422253?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/GoLangTutorials/~3/KYWCVz2Bjz8/analysing-google-appenginge-for-go.html" title="Analysing a Google AppEnginge for Go program" /><author><name>Sathish VJ</name><uri>http://www.blogger.com/profile/15718521031646368740</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><content type="html">Other topics in this series - Table of Contents

In this section, we shall look at an existing demo program that we ran in the Installation and Setup tutorial.  This will be a good place to start analysing and understanding Go programs for the Google AppEngine and will allow us to move on to larger programs of our own.  

Directory Structure
The list of files under google_appengine/demos/
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/JxhZQFLQ3IgjNpxeKt6KJWCOGJk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JxhZQFLQ3IgjNpxeKt6KJWCOGJk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/JxhZQFLQ3IgjNpxeKt6KJWCOGJk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JxhZQFLQ3IgjNpxeKt6KJWCOGJk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/GoLangTutorials/~4/KYWCVz2Bjz8" height="1" width="1"/&gt;</content><feedburner:origLink>http://golangtutorials.blogspot.com/2011/10/analysing-google-appenginge-for-go.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0AESXo6eCp7ImA9WhRTEUQ.&quot;"><id>tag:blogger.com,1999:blog-8110657754519829885.post-7477442574980410407</id><published>2011-10-30T05:17:00.000-07:00</published><updated>2011-11-01T18:01:48.410-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-01T18:01:48.410-07:00</app:edited><title>Go packages and goinstall - creating and using your own packages in Go</title><link rel="replies" type="application/atom+xml" href="http://golangtutorials.blogspot.com/feeds/7477442574980410407/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://golangtutorials.blogspot.com/2011/10/go-packages-and-goinstall-creating-and.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/7477442574980410407?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/7477442574980410407?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/GoLangTutorials/~3/EUZHv8VvWEc/go-packages-and-goinstall-creating-and.html" title="Go packages and goinstall - creating and using your own packages in Go" /><author><name>Sathish VJ</name><uri>http://www.blogger.com/profile/15718521031646368740</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><content type="html">Other topics in this series - Table of Contents


For a small beginner’s introduction to packages you can read my other writeup: Go ‘Hello World’ - A line by line approach.  In this tutorial we will look at how you can work with the goinstall tool to create, install, and use your own packages locally.  goinstall has larger functionality than this alone and you can read more about it here: Command
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/CtMiiQsF4nsNbaujuyLBt78PnjE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/CtMiiQsF4nsNbaujuyLBt78PnjE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/CtMiiQsF4nsNbaujuyLBt78PnjE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/CtMiiQsF4nsNbaujuyLBt78PnjE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/GoLangTutorials/~4/EUZHv8VvWEc" height="1" width="1"/&gt;</content><feedburner:origLink>http://golangtutorials.blogspot.com/2011/10/go-packages-and-goinstall-creating-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8GQnk_eip7ImA9WhRSE0U.&quot;"><id>tag:blogger.com,1999:blog-8110657754519829885.post-4322404616311752563</id><published>2011-10-25T18:56:00.000-07:00</published><updated>2011-11-15T11:03:43.742-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-15T11:03:43.742-08:00</app:edited><title>Go Templates - Part 2</title><link rel="replies" type="application/atom+xml" href="http://golangtutorials.blogspot.com/feeds/4322404616311752563/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://golangtutorials.blogspot.com/2011/10/go-templates-part-2.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/4322404616311752563?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/4322404616311752563?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/GoLangTutorials/~3/0JcEkthP8Fc/go-templates-part-2.html" title="Go Templates - Part 2" /><author><name>Sathish VJ</name><uri>http://www.blogger.com/profile/15718521031646368740</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">Other topics in this series - Table of Contents
See also: Go Templates - Part 1
See also: Go Templates - Part 3 - Template Sets


There is fairly good documentation about the template package at http://golang.org/pkg/template/.  It contains definitions for many of the structures and formats that are parseable by the template package.  So here I shall try to only supplement that with a few 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/mpS0f749KcWhXRxMvCIKjE7Rfrs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mpS0f749KcWhXRxMvCIKjE7Rfrs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/mpS0f749KcWhXRxMvCIKjE7Rfrs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mpS0f749KcWhXRxMvCIKjE7Rfrs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/GoLangTutorials/~4/0JcEkthP8Fc" height="1" width="1"/&gt;</content><feedburner:origLink>http://golangtutorials.blogspot.com/2011/10/go-templates-part-2.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0ADRHs5eyp7ImA9WhRTEUQ.&quot;"><id>tag:blogger.com,1999:blog-8110657754519829885.post-4319258117897034143</id><published>2011-10-24T17:02:00.000-07:00</published><updated>2011-11-01T18:02:55.523-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-01T18:02:55.523-07:00</app:edited><title>Google AppEngine for Go - Installation and Setup</title><link rel="replies" type="application/atom+xml" href="http://golangtutorials.blogspot.com/feeds/4319258117897034143/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://golangtutorials.blogspot.com/2011/10/google-appengine-for-go-installation.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/4319258117897034143?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/4319258117897034143?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/GoLangTutorials/~3/x11MZeP1s2k/google-appengine-for-go-installation.html" title="Google AppEngine for Go - Installation and Setup" /><author><name>Sathish VJ</name><uri>http://www.blogger.com/profile/15718521031646368740</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">
Other topics in this series - Table of Contents

Setting up Google AppEngine for Go is real simple and can have you testing out functionality quickly.  There are a few things that might be better to inform you early - they are simpler than setting up certain other development environments, so you might end up searching for complexity and ending up confused for not finding it.  

A few things to 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/DZaiGGFENlK-NoUNZzmvY3SoG3s/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DZaiGGFENlK-NoUNZzmvY3SoG3s/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/DZaiGGFENlK-NoUNZzmvY3SoG3s/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DZaiGGFENlK-NoUNZzmvY3SoG3s/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/GoLangTutorials/~4/x11MZeP1s2k" height="1" width="1"/&gt;</content><feedburner:origLink>http://golangtutorials.blogspot.com/2011/10/google-appengine-for-go-installation.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08ARHw6fip7ImA9WhRTEUQ.&quot;"><id>tag:blogger.com,1999:blog-8110657754519829885.post-1816650035134636277</id><published>2011-06-24T08:22:00.000-07:00</published><updated>2011-11-01T18:04:05.216-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-01T18:04:05.216-07:00</app:edited><title>Control structures - Go defer statement</title><link rel="replies" type="application/atom+xml" href="http://golangtutorials.blogspot.com/feeds/1816650035134636277/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://golangtutorials.blogspot.com/2011/06/control-structures-go-defer-statement.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/1816650035134636277?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/1816650035134636277?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/GoLangTutorials/~3/Z9zsUDo7oIs/control-structures-go-defer-statement.html" title="Control structures - Go defer statement" /><author><name>Sathish VJ</name><uri>http://www.blogger.com/profile/15718521031646368740</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">Other topics in this series - Table of ContentsThe defer statement allows you to designate specified functions to be executed just before returning from the current function block.  Why would this be useful?  In programming we often have to allocate/block/lock resources, but then the program abruptly ends in between and is unable to reach the part of the code where we un-allocate/unblock/unlock 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/soQ1giiGYc9S7zpZ3kD6_YaP7hk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/soQ1giiGYc9S7zpZ3kD6_YaP7hk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/soQ1giiGYc9S7zpZ3kD6_YaP7hk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/soQ1giiGYc9S7zpZ3kD6_YaP7hk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/GoLangTutorials/~4/Z9zsUDo7oIs" height="1" width="1"/&gt;</content><feedburner:origLink>http://golangtutorials.blogspot.com/2011/06/control-structures-go-defer-statement.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08CR3w6fCp7ImA9WhRTEUQ.&quot;"><id>tag:blogger.com,1999:blog-8110657754519829885.post-7333348126431702034</id><published>2011-06-23T08:03:00.000-07:00</published><updated>2011-11-01T18:04:26.214-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-01T18:04:26.214-07:00</app:edited><title>Control structures - Go switch case statement</title><link rel="replies" type="application/atom+xml" href="http://golangtutorials.blogspot.com/feeds/7333348126431702034/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://golangtutorials.blogspot.com/2011/06/control-structures-go-switch-case.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/7333348126431702034?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/7333348126431702034?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/GoLangTutorials/~3/-PIMKjV7j9Y/control-structures-go-switch-case.html" title="Control structures - Go switch case statement" /><author><name>Sathish VJ</name><uri>http://www.blogger.com/profile/15718521031646368740</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><content type="html">Other topics in this series - Table of ContentsThe switch statement may be considered a more powerful version of the if statement where multiple if-else blocks are replaced with a single switch and multiple case blocks.  There are differences though between the two and we shall see them in some examples.  


switch any expression of type T {
case any expression of same type T: { code to be 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/iQVNdlAbZx-V0bEZfu_92eJFFGI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/iQVNdlAbZx-V0bEZfu_92eJFFGI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/iQVNdlAbZx-V0bEZfu_92eJFFGI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/iQVNdlAbZx-V0bEZfu_92eJFFGI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/GoLangTutorials/~4/-PIMKjV7j9Y" height="1" width="1"/&gt;</content><feedburner:origLink>http://golangtutorials.blogspot.com/2011/06/control-structures-go-switch-case.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08MQnk9cSp7ImA9WhRTEUQ.&quot;"><id>tag:blogger.com,1999:blog-8110657754519829885.post-4719622971056073266</id><published>2011-06-22T07:16:00.000-07:00</published><updated>2011-11-01T18:04:43.769-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-01T18:04:43.769-07:00</app:edited><title>Control structures - Go for loop, break, continue, range</title><link rel="replies" type="application/atom+xml" href="http://golangtutorials.blogspot.com/feeds/4719622971056073266/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://golangtutorials.blogspot.com/2011/06/control-structures-go-for-loop-break.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/4719622971056073266?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/4719622971056073266?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/GoLangTutorials/~3/GumQMhng_4U/control-structures-go-for-loop-break.html" title="Control structures - Go for loop, break, continue, range" /><author><name>Sathish VJ</name><uri>http://www.blogger.com/profile/15718521031646368740</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>3</thr:total><content type="html">Other topics in this series - Table of ContentsThe for statement is the only available looping statement in Go.  The generic statement definition is:


for "initialization statements"; "bool expression that has to evaluate to true"; "statements run prior to every loop except the first" {
    //code to be executed if the boolean expression evaluates to true
}


Any of the parts of the for 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/JN98157UO1eipLS3mZJbXzrq658/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JN98157UO1eipLS3mZJbXzrq658/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/JN98157UO1eipLS3mZJbXzrq658/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JN98157UO1eipLS3mZJbXzrq658/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/GoLangTutorials/~4/GumQMhng_4U" height="1" width="1"/&gt;</content><feedburner:origLink>http://golangtutorials.blogspot.com/2011/06/control-structures-go-for-loop-break.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D04HSHw-eyp7ImA9WhRTEUQ.&quot;"><id>tag:blogger.com,1999:blog-8110657754519829885.post-810483305711878236</id><published>2011-06-21T11:51:00.000-07:00</published><updated>2011-11-01T18:05:39.253-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-01T18:05:39.253-07:00</app:edited><title>Control structures - Go if else statement</title><link rel="replies" type="application/atom+xml" href="http://golangtutorials.blogspot.com/feeds/810483305711878236/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://golangtutorials.blogspot.com/2011/06/control-structures-if-else-statement.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/810483305711878236?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/810483305711878236?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/GoLangTutorials/~3/HwbnJTLx3_w/control-structures-if-else-statement.html" title="Control structures - Go if else statement" /><author><name>Sathish VJ</name><uri>http://www.blogger.com/profile/15718521031646368740</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">Other topics in this series - Table of ContentsPrograms need to be able to take up different courses of action based on different situations - if you want to go to the beach turn left, or if you want to go the movies, turn right.  The if else statement is a simple control structure.  The general statement in Go is similar to:

if some_boolean_expression {
    // execute this block if 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/GHtycMxr9Yx6ru8S69-3fKQMk9k/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GHtycMxr9Yx6ru8S69-3fKQMk9k/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/GHtycMxr9Yx6ru8S69-3fKQMk9k/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GHtycMxr9Yx6ru8S69-3fKQMk9k/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/GoLangTutorials/~4/HwbnJTLx3_w" height="1" width="1"/&gt;</content><feedburner:origLink>http://golangtutorials.blogspot.com/2011/06/control-structures-if-else-statement.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D04BSH85eip7ImA9WhRTEUQ.&quot;"><id>tag:blogger.com,1999:blog-8110657754519829885.post-3387777135935375851</id><published>2011-06-15T05:29:00.000-07:00</published><updated>2011-11-01T18:05:59.122-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-01T18:05:59.122-07:00</app:edited><title>Multiple return values from Go functions</title><link rel="replies" type="application/atom+xml" href="http://golangtutorials.blogspot.com/feeds/3387777135935375851/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://golangtutorials.blogspot.com/2011/06/return-values-from-go-functions.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/3387777135935375851?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/3387777135935375851?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/GoLangTutorials/~3/On0RDZGBrAg/return-values-from-go-functions.html" title="Multiple return values from Go functions" /><author><name>Sathish VJ</name><uri>http://www.blogger.com/profile/15718521031646368740</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><content type="html">Other topics in this series - Table of ContentsGo allows you to have a function that returns multiple values.  A function definition that returns three values would be defined similar to:

func SumProdDiff(i, j int) (int, int, int)

Since there is more than one return value, it is necessary to enclose it within parentheses.  To return values from a function such as the above, you would have a 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/BFDWZ39ErD5P2_hc_LvTA_GbdBk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BFDWZ39ErD5P2_hc_LvTA_GbdBk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/BFDWZ39ErD5P2_hc_LvTA_GbdBk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BFDWZ39ErD5P2_hc_LvTA_GbdBk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/GoLangTutorials/~4/On0RDZGBrAg" height="1" width="1"/&gt;</content><feedburner:origLink>http://golangtutorials.blogspot.com/2011/06/return-values-from-go-functions.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8MRnk7cSp7ImA9WhRSE0U.&quot;"><id>tag:blogger.com,1999:blog-8110657754519829885.post-3515544879188888378</id><published>2011-06-14T08:03:00.000-07:00</published><updated>2011-11-15T11:04:47.709-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-15T11:04:47.709-08:00</app:edited><title>Go Templates (Updated Oct 2011)</title><link rel="replies" type="application/atom+xml" href="http://golangtutorials.blogspot.com/feeds/3515544879188888378/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://golangtutorials.blogspot.com/2011/06/go-templates.html#comment-form" title="8 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/3515544879188888378?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/3515544879188888378?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/GoLangTutorials/~3/1TrQDGGDLU8/go-templates.html" title="Go Templates (Updated Oct 2011)" /><author><name>Sathish VJ</name><uri>http://www.blogger.com/profile/15718521031646368740</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-IHz2KgYgxLQ/TfekD-hQviI/AAAAAAAABIk/_qlNZj3YzKQ/s72-c/templates1.png" height="72" width="72" /><thr:total>8</thr:total><content type="html">Other topics in this series - Table of Contents
See also: Go Templates - Part 2
See also: Go Templates - Part 3 - Template Sets
When a web service responds with data or html pages, there is usually a lot of content that is standard.  Within that there needs to be modifications done based on the user and what has been requested.  Templates are a way to merge generic text with more specific text.  
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/n0WJahh5xAz8TtPkWjXGQfxvOBs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/n0WJahh5xAz8TtPkWjXGQfxvOBs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/n0WJahh5xAz8TtPkWjXGQfxvOBs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/n0WJahh5xAz8TtPkWjXGQfxvOBs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/GoLangTutorials/~4/1TrQDGGDLU8" height="1" width="1"/&gt;</content><feedburner:origLink>http://golangtutorials.blogspot.com/2011/06/go-templates.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEcGSX45eyp7ImA9WhRTEUQ.&quot;"><id>tag:blogger.com,1999:blog-8110657754519829885.post-5308198965663666266</id><published>2011-06-11T16:00:00.000-07:00</published><updated>2011-11-01T18:07:08.023-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-01T18:07:08.023-07:00</app:edited><title>Web Programming with Go - first web Hello world</title><link rel="replies" type="application/atom+xml" href="http://golangtutorials.blogspot.com/feeds/5308198965663666266/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://golangtutorials.blogspot.com/2011/06/web-programming-with-go-first-web-hello.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/5308198965663666266?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/5308198965663666266?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/GoLangTutorials/~3/XDwABM7Azsc/web-programming-with-go-first-web-hello.html" title="Web Programming with Go - first web Hello world" /><author><name>Sathish VJ</name><uri>http://www.blogger.com/profile/15718521031646368740</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><content type="html">Other topics in this series - Table of ContentsIf you’ve already gone through some of the earlier tutorials in this series, you should be quite comfortable getting onto programming the web with Go.  Let’s jump right to it and then we shall analyze the code.  There is a chance that there might be people arriving here for the first time, so we shall also take some time to go over the basic concepts
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/PSLz5txiATiMhATd_h3sN9ICA8o/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PSLz5txiATiMhATd_h3sN9ICA8o/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/PSLz5txiATiMhATd_h3sN9ICA8o/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PSLz5txiATiMhATd_h3sN9ICA8o/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/GoLangTutorials/~4/XDwABM7Azsc" height="1" width="1"/&gt;</content><feedburner:origLink>http://golangtutorials.blogspot.com/2011/06/web-programming-with-go-first-web-hello.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEcAR3Y9cCp7ImA9WhRTEUQ.&quot;"><id>tag:blogger.com,1999:blog-8110657754519829885.post-8060742057817931346</id><published>2011-06-11T05:45:00.000-07:00</published><updated>2011-11-01T18:07:26.868-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-01T18:07:26.868-07:00</app:edited><title>Channels in Go - range and select</title><link rel="replies" type="application/atom+xml" href="http://golangtutorials.blogspot.com/feeds/8060742057817931346/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://golangtutorials.blogspot.com/2011/06/channels-in-go-range-and-select.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/8060742057817931346?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/8060742057817931346?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/GoLangTutorials/~3/1kNXInN9WnA/channels-in-go-range-and-select.html" title="Channels in Go - range and select" /><author><name>Sathish VJ</name><uri>http://www.blogger.com/profile/15718521031646368740</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">Other topics in this series - Table of ContentsChannels and rangeThis is the second part of tutorial on channels in Go.  If you haven’t yet gone through the first part, Channels in Go, please go through it now.  

Receivers of data have a problem of knowing when to stop waiting for data.  Is there more to come or is it all done?  Should we wait or should we move on?  One option is to constantly 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/GiwmwjKRbRUYx5znr3Kyn3CGbL0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GiwmwjKRbRUYx5znr3Kyn3CGbL0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/GiwmwjKRbRUYx5znr3Kyn3CGbL0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GiwmwjKRbRUYx5znr3Kyn3CGbL0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/GoLangTutorials/~4/1kNXInN9WnA" height="1" width="1"/&gt;</content><feedburner:origLink>http://golangtutorials.blogspot.com/2011/06/channels-in-go-range-and-select.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEcCRn05eCp7ImA9WhRTEUQ.&quot;"><id>tag:blogger.com,1999:blog-8110657754519829885.post-1162139519303847938</id><published>2011-06-09T16:09:00.000-07:00</published><updated>2011-11-01T18:07:47.320-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-01T18:07:47.320-07:00</app:edited><title>Channels in Go</title><link rel="replies" type="application/atom+xml" href="http://golangtutorials.blogspot.com/feeds/1162139519303847938/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://golangtutorials.blogspot.com/2011/06/channels-in-go.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/1162139519303847938?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/1162139519303847938?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/GoLangTutorials/~3/zhd8DI2Z28s/channels-in-go.html" title="Channels in Go" /><author><name>Sathish VJ</name><uri>http://www.blogger.com/profile/15718521031646368740</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-RlFbVyp66qw/TfFQDBF2JtI/AAAAAAAABIM/ArTxswQ0GeE/s72-c/channels.png" height="72" width="72" /><thr:total>1</thr:total><content type="html">Other topics in this series - Table of ContentsGoroutines allow you to run a piece of code in parallel to others.  But to employ it usefully, there are a few additional requirements - we should be able to pass data into the running process and we should be able to get data out of the running process when it is done creating it.  Channels provide the way to do that, and they work alongside 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/HhZpZ9wYuwtDJhZvK1MGkNeyjkM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/HhZpZ9wYuwtDJhZvK1MGkNeyjkM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/HhZpZ9wYuwtDJhZvK1MGkNeyjkM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/HhZpZ9wYuwtDJhZvK1MGkNeyjkM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/GoLangTutorials/~4/zhd8DI2Z28s" height="1" width="1"/&gt;</content><feedburner:origLink>http://golangtutorials.blogspot.com/2011/06/channels-in-go.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEYFR3g_eyp7ImA9WhRTEUQ.&quot;"><id>tag:blogger.com,1999:blog-8110657754519829885.post-3848488526159333806</id><published>2011-06-09T06:43:00.000-07:00</published><updated>2011-11-01T18:08:36.643-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-01T18:08:36.643-07:00</app:edited><title>Goroutines</title><link rel="replies" type="application/atom+xml" href="http://golangtutorials.blogspot.com/feeds/3848488526159333806/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://golangtutorials.blogspot.com/2011/06/goroutines.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/3848488526159333806?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/3848488526159333806?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/GoLangTutorials/~3/cGKJf1YJAak/goroutines.html" title="Goroutines" /><author><name>Sathish VJ</name><uri>http://www.blogger.com/profile/15718521031646368740</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-n7-qbNilhsQ/TfDLMX0tyFI/AAAAAAAABH8/wX04pyqEVaQ/s72-c/parallel-execution.png" height="72" width="72" /><thr:total>0</thr:total><content type="html">Other topics in this series - Table of ContentsGoroutines allow you to execute tasks in parallel - there are many connotations to the word ‘parallel’ in computing, so, take that with a pinch of salt.  Parallel for example could mean the same program running on multiple hardware chips, on multiple machines, on multiple threads within the same machine, or multiplexed on the same thread.  The Go 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/8z-a5EHIKzI5c07pTaV4SpH2Ae0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8z-a5EHIKzI5c07pTaV4SpH2Ae0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/8z-a5EHIKzI5c07pTaV4SpH2Ae0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8z-a5EHIKzI5c07pTaV4SpH2Ae0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/GoLangTutorials/~4/cGKJf1YJAak" height="1" width="1"/&gt;</content><feedburner:origLink>http://golangtutorials.blogspot.com/2011/06/goroutines.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEYHQXg5cSp7ImA9WhRTEUQ.&quot;"><id>tag:blogger.com,1999:blog-8110657754519829885.post-3729257176458817648</id><published>2011-06-08T08:35:00.000-07:00</published><updated>2011-11-01T18:08:50.629-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-01T18:08:50.629-07:00</app:edited><title>Summary of Object Oriented Programming Goodness in Go, without the pain</title><link rel="replies" type="application/atom+xml" href="http://golangtutorials.blogspot.com/feeds/3729257176458817648/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://golangtutorials.blogspot.com/2011/06/summary-of-object-oriented-programming.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/3729257176458817648?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/3729257176458817648?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/GoLangTutorials/~3/SJlOZN_xKMA/summary-of-object-oriented-programming.html" title="Summary of Object Oriented Programming Goodness in Go, without the pain" /><author><name>Sathish VJ</name><uri>http://www.blogger.com/profile/15718521031646368740</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">Other topics in this series - Table of Contents

If you haven’t gone over some of the related topics on this, please do so now.  Here I’ll mostly be summarizing what we already went over so that it is available as a quick reference, especially for all those people who have been used to doing object oriented programming.

Structs in Go

Anonymous fields in structs

Methods on structs

Inheritance 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/GhIbrKLf998uHjepZIjBUQHahfw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GhIbrKLf998uHjepZIjBUQHahfw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/GhIbrKLf998uHjepZIjBUQHahfw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GhIbrKLf998uHjepZIjBUQHahfw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/GoLangTutorials/~4/SJlOZN_xKMA" height="1" width="1"/&gt;</content><feedburner:origLink>http://golangtutorials.blogspot.com/2011/06/summary-of-object-oriented-programming.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEYAQno6cSp7ImA9WhRTEUQ.&quot;"><id>tag:blogger.com,1999:blog-8110657754519829885.post-1416019223376987642</id><published>2011-06-08T08:28:00.000-07:00</published><updated>2011-11-01T18:09:03.419-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-01T18:09:03.419-07:00</app:edited><title>Polymorphism in Go</title><link rel="replies" type="application/atom+xml" href="http://golangtutorials.blogspot.com/feeds/1416019223376987642/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://golangtutorials.blogspot.com/2011/06/polymorphism-in-go.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/1416019223376987642?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/1416019223376987642?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/GoLangTutorials/~3/NnKyDrh-2CU/polymorphism-in-go.html" title="Polymorphism in Go" /><author><name>Sathish VJ</name><uri>http://www.blogger.com/profile/15718521031646368740</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">Other topics in this series - Table of Contents
Sometimes I’ve found it easier to explain polymorphism with an illustration.  An illustration attempts to simplify and has its drawbacks, but it could help clarify the idea.  Assume a martian came to earth and he knows about humans but he doesn’t know about the difference between a man and a woman.  He now approaches random humans on the street and 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/kt0EkwZY4bk4CursKC-zQfizREE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kt0EkwZY4bk4CursKC-zQfizREE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/kt0EkwZY4bk4CursKC-zQfizREE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kt0EkwZY4bk4CursKC-zQfizREE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/GoLangTutorials/~4/NnKyDrh-2CU" height="1" width="1"/&gt;</content><feedburner:origLink>http://golangtutorials.blogspot.com/2011/06/polymorphism-in-go.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEYDQXs4eSp7ImA9WhRTEUQ.&quot;"><id>tag:blogger.com,1999:blog-8110657754519829885.post-161163078293750303</id><published>2011-06-08T03:17:00.000-07:00</published><updated>2011-11-01T18:09:30.531-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-01T18:09:30.531-07:00</app:edited><title>Multiple inheritance in Go</title><link rel="replies" type="application/atom+xml" href="http://golangtutorials.blogspot.com/feeds/161163078293750303/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://golangtutorials.blogspot.com/2011/06/multiple-inheritance-in-go.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/161163078293750303?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/161163078293750303?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/GoLangTutorials/~3/vkp9aCYxTzE/multiple-inheritance-in-go.html" title="Multiple inheritance in Go" /><author><name>Sathish VJ</name><uri>http://www.blogger.com/profile/15718521031646368740</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><content type="html">Other topics in this series - Table of Contents
Inheritance is the ability for a type to automatically obtain the behaviors of a parent class.  Multiple inheritance is the ability for a type to obtain the behaviors of more than one parent class.  As a real world example, if Phone was a type, then MobilePhone could be a type that inherits the behavior of the Phone type.  This works in many cases, 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-EgmztqKqHCigwwV9gjIovvHvTg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-EgmztqKqHCigwwV9gjIovvHvTg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-EgmztqKqHCigwwV9gjIovvHvTg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-EgmztqKqHCigwwV9gjIovvHvTg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/GoLangTutorials/~4/vkp9aCYxTzE" height="1" width="1"/&gt;</content><feedburner:origLink>http://golangtutorials.blogspot.com/2011/06/multiple-inheritance-in-go.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEYMSHw-eSp7ImA9WhRTEUQ.&quot;"><id>tag:blogger.com,1999:blog-8110657754519829885.post-104378636529027980</id><published>2011-06-07T18:03:00.000-07:00</published><updated>2011-11-01T18:09:49.251-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-01T18:09:49.251-07:00</app:edited><title>Inheritance and subclassing in Go - or its near likeness</title><link rel="replies" type="application/atom+xml" href="http://golangtutorials.blogspot.com/feeds/104378636529027980/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://golangtutorials.blogspot.com/2011/06/inheritance-and-subclassing-in-go-or.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/104378636529027980?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8110657754519829885/posts/default/104378636529027980?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/GoLangTutorials/~3/9m-rxGWvE_E/inheritance-and-subclassing-in-go-or.html" title="Inheritance and subclassing in Go - or its near likeness" /><author><name>Sathish VJ</name><uri>http://www.blogger.com/profile/15718521031646368740</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><content type="html">Other topics in this series - Table of Contents
Those of you used to other object oriented languages probably already know what inheritance and subclassing is.  In simple terms, it is the ability of one type to inherit the behavior of another type.  An Employee has all the behaviors of a Human, and then some more.  A Ferrari has all the behaviors of a Car, and some more.  An Aston Martin has all 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/kXdBEPpCevOi_-WKI5sahPqDK10/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kXdBEPpCevOi_-WKI5sahPqDK10/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/kXdBEPpCevOi_-WKI5sahPqDK10/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kXdBEPpCevOi_-WKI5sahPqDK10/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/GoLangTutorials/~4/9m-rxGWvE_E" height="1" width="1"/&gt;</content><feedburner:origLink>http://golangtutorials.blogspot.com/2011/06/inheritance-and-subclassing-in-go-or.html</feedburner:origLink></entry></feed>

