blob: 5fd55385481a4791e2e0313bc53c6083823ce3e1 [file] [log] [blame]
Russ Cox09fe2832009-10-22 00:13:36 -07001<!-- The Go Programming Language -->
2
Adam Langleyb9ec2ad2009-11-03 19:59:45 -08003<script>
4 // On the frontpage we hide the header and navigation elements that other
5 // pages have.
6 document.getElementById('generatedHeader').style.display = 'none';
7 document.getElementById('nav').style.display = 'none';
8</script>
9
Andrew Gerrand7190fdd2010-03-20 11:42:57 +110010<!-- begin blog post widget JS/styles -->
Andrew Gerrandcd5191f2010-04-27 10:24:17 +100011<script src="http://www.google.com/jsapi" type="text/javascript"></script>
Andrew Gerrand7190fdd2010-03-20 11:42:57 +110012<script type="text/javascript">
Andrew Gerrand28c63052010-04-27 19:27:32 +100013function loadFeed() {
14 var url = "http://blog.golang.org/feeds/posts/default";
15 var divId = "blogFeed";
16 var feed = new google.feeds.Feed(url);
17 feed.setNumEntries(8)
18 feed.load(function (result) {
19 var container = document.getElementById(divId)
20 if (result.error) {
21 container.innerHTML = "Error loading feed.";
22 return;
23 }
24 container.innerHTML = "";
25 var entries = result.feed.entries;
Andrew Gerrandbab711b2010-07-30 10:36:13 +100026 console.log(entries);
Andrew Gerrand28c63052010-04-27 19:27:32 +100027 for (var i=0; i<entries.length; i++) {
28 var a = document.createElement("a");
29 a.setAttribute("href", entries[i].link);
30 a.appendChild(document.createTextNode(entries[i].title));
31 container.appendChild(a);
32 }
Andrew Gerrand7190fdd2010-03-20 11:42:57 +110033 });
34}
35google.load("feeds", "1");
Andrew Gerrand28c63052010-04-27 19:27:32 +100036google.setOnLoadCallback(loadFeed);
Andrew Gerrand7190fdd2010-03-20 11:42:57 +110037</script>
38<!-- end blog post widget JS/styles -->
39
Adam Langleyb9ec2ad2009-11-03 19:59:45 -080040<table style="padding-top: 1em; padding-bottom: 2em;">
41 <tr>
42 <td>
Adam Langley51c1bd22009-11-05 12:18:54 -080043 <img style="padding-right: 1em;" src="/doc/go-logo-black.png">
Adam Langleyb9ec2ad2009-11-03 19:59:45 -080044 </td>
45 <td>
Robert Griesemer3a94e8c2009-11-06 12:52:04 -080046 <div><span style="font-size: 2em; font-weight: bold;">a systems programming language</span><br><span style="font-size: 1.5em;">expressive, concurrent, garbage-collected</span></div>
Adam Langleyb9ec2ad2009-11-03 19:59:45 -080047 </td>
48 </tr>
49</table>
50
Andrew Gerrandbab711b2010-07-30 10:36:13 +100051<div id="fp-videos">
52 <h1>Go videos</h1>
53 <div class="video">
54 <a href="http://www.youtube.com/watch?v=jgVhBThJdXc"><img src="/doc/video-snap-io.jpg"></a>
55 <div class="title">"Go Programming"</div>
56 <div class="subtitle">Google I/O Tech Talk</div>
57 </div>
58 <div class="video">
59 <a href="http://www.youtube.com/watch?v=wwoWei-GAPo"><img src="/doc/video-snap-fastcompiles.jpg"></a>
60 <div class="title">"Fast Compiles"</div>
61 <div class="subtitle">Go Promotional Video</div>
62 </div>
63 <div class="video">
64 <a href="http://www.youtube.com/gocoding"><img src="/doc/video-snap-gocoding.jpg"></a>
65 <div class="title">Go Youtube Channel</div>
66 <div class="subtitle">Screencasts and more</div>
67 </div>
68 <a class="more" href="/doc/go_learning.html#videos_talks">More videos and talks.</a>
69</div>
70
71<div id="frontpage">
72
73<div id="blog">
74 <h1>From the <a href="http://blog.golang.org">Go Blog</a>:</h1>
75 <div id="blogFeed">Loading...</div>
76</div>
77
Adam Langleyb9ec2ad2009-11-03 19:59:45 -080078<p style="font-size: 1.5em; font-weight: bold;">Go is &hellip;</p>
79
80<h3>&hellip; simple</h3>
81<pre class="code">
82package main
83
84import "fmt"
85
86func main() {
Rob Piked5717d22009-11-05 13:39:00 -080087 fmt.Printf("Hello, 世界\n")
Adam Langleyb9ec2ad2009-11-03 19:59:45 -080088}</pre>
89
Andrew Gerrandbab711b2010-07-30 10:36:13 +100090<p>Go has a small, simple feature set, making it easy to learn.</p>
91
Adam Langleyb9ec2ad2009-11-03 19:59:45 -080092<h3>&hellip; fast</h3>
93
Rob Piked5717d22009-11-05 13:39:00 -080094<p>
95Go compilers produce fast code fast. Typical builds take a fraction of a second yet the resulting programs run nearly as quickly as comparable C or C++ code.
96</p>
Adam Langleyb9ec2ad2009-11-03 19:59:45 -080097
Andrew Gerrandbab711b2010-07-30 10:36:13 +100098<h3>&hellip; concurrent</h3>
99
100<p>
101Go promotes writing systems and servers as sets of lightweight communicating
102processes, called goroutines, with strong support from the language. Run
103thousands of goroutines if you want&mdash;and say good-bye to stack overflows.
104</p>
105
Adam Langleyb9ec2ad2009-11-03 19:59:45 -0800106<h3>&hellip; safe</h3>
107
Rob Piked5717d22009-11-05 13:39:00 -0800108<p>Go is type safe and memory safe. Go has pointers but no pointer arithmetic.
109For random access, use slices, which know their limits.</p>
Adam Langleyb9ec2ad2009-11-03 19:59:45 -0800110
Rob Piked5717d22009-11-05 13:39:00 -0800111<h3>&hellip; fun</h3>
112
113<p>
114Go has fast builds, clean syntax, garbage collection,
115methods for any type, and run-time reflection.
116It feels like a dynamic language but has the speed and safety of a static language.
117It's a joy to use.
118</p>
119
Rob Pikec765c092009-11-06 22:48:05 -0800120<h3>&hellip; open source</h3>
121
122<p>
Rob Piked10f1542009-11-08 22:02:15 -0800123<a href="/doc/install.html">Go for it</a>.
Rob Pikec765c092009-11-06 22:48:05 -0800124</p>
125
Adam Langleyb9ec2ad2009-11-03 19:59:45 -0800126</div>