blob: 3a5a495154a939f3f37889a92efadc301152e2d6 [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;
26 for (var i=0; i<entries.length; i++) {
27 var a = document.createElement("a");
28 a.setAttribute("href", entries[i].link);
29 a.appendChild(document.createTextNode(entries[i].title));
30 container.appendChild(a);
31 }
Andrew Gerrand7190fdd2010-03-20 11:42:57 +110032 });
33}
34google.load("feeds", "1");
Andrew Gerrand28c63052010-04-27 19:27:32 +100035google.setOnLoadCallback(loadFeed);
Andrew Gerrand7190fdd2010-03-20 11:42:57 +110036</script>
37<!-- end blog post widget JS/styles -->
38
Adam Langleyb9ec2ad2009-11-03 19:59:45 -080039<div id="gettingStarted">
40 <h1>Getting started</h1>
41
42 <ol>
43 <li>
44 <span><a href="/doc/install.html">Install Go</a>.</span>
45 </li>
46
47 <li>
48 <span>Read the <a href="/doc/go_tutorial.html">tutorial</a>.</span>
49 </li>
50
51 <li>
52 <span>Learn the <a href="/pkg">libraries</a>.</span>
53 </li>
54 </ol>
55
Rob Piked10f1542009-11-08 22:02:15 -080056 <h1>Slow compiles?<br>Watch this</h1>
57 <table width="100%">
Adam Langley51c1bd22009-11-05 12:18:54 -080058 <tr>
Russ Coxb94f8132009-11-07 12:11:28 -080059 <td align=center width="100%">
Russ Cox78c47c32009-11-10 14:09:01 -080060 <a href="http://www.youtube.com/watch?v=wwoWei-GAPo"><img src="/doc/video-snap.jpg"></a>
Adam Langley51c1bd22009-11-05 12:18:54 -080061 </td>
Rob Piked5717d22009-11-05 13:39:00 -080062 </tr>
Adam Langley51c1bd22009-11-05 12:18:54 -080063 </table>
Adam Langleyb9ec2ad2009-11-03 19:59:45 -080064</div>
65
Andrew Gerrand7190fdd2010-03-20 11:42:57 +110066<div id="blog">
67 <h1>From the <a href="http://blog.golang.org">Go Blog</a>:</h1>
Andrew Gerrand28c63052010-04-27 19:27:32 +100068 <div id="blogFeed">Loading...</div>
Andrew Gerrand7190fdd2010-03-20 11:42:57 +110069</div>
70
71
Adam Langleyb9ec2ad2009-11-03 19:59:45 -080072<div id="frontpage">
73
74<table style="padding-top: 1em; padding-bottom: 2em;">
75 <tr>
76 <td>
Adam Langley51c1bd22009-11-05 12:18:54 -080077 <img style="padding-right: 1em;" src="/doc/go-logo-black.png">
Adam Langleyb9ec2ad2009-11-03 19:59:45 -080078 </td>
79 <td>
Robert Griesemer3a94e8c2009-11-06 12:52:04 -080080 <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 -080081 </td>
82 </tr>
83</table>
84
85<p style="font-size: 1.5em; font-weight: bold;">Go is &hellip;</p>
86
87<h3>&hellip; simple</h3>
88<pre class="code">
89package main
90
91import "fmt"
92
93func main() {
Rob Piked5717d22009-11-05 13:39:00 -080094 fmt.Printf("Hello, 世界\n")
Adam Langleyb9ec2ad2009-11-03 19:59:45 -080095}</pre>
96
97<h3>&hellip; fast</h3>
98
Rob Piked5717d22009-11-05 13:39:00 -080099<p>
100Go 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.
101</p>
Adam Langleyb9ec2ad2009-11-03 19:59:45 -0800102
103<h3>&hellip; safe</h3>
104
Rob Piked5717d22009-11-05 13:39:00 -0800105<p>Go is type safe and memory safe. Go has pointers but no pointer arithmetic.
106For random access, use slices, which know their limits.</p>
Adam Langleyb9ec2ad2009-11-03 19:59:45 -0800107
108<h3>&hellip; concurrent</h3>
109
Rob Piked5717d22009-11-05 13:39:00 -0800110<p>
111Go promotes writing systems and servers as sets of lightweight
112communicating processes, called goroutines, with strong support from the language.
113Run thousands of goroutines if you want&mdash;and say good-bye to stack overflows.
114</p>
115
116<h3>&hellip; fun</h3>
117
118<p>
119Go has fast builds, clean syntax, garbage collection,
120methods for any type, and run-time reflection.
121It feels like a dynamic language but has the speed and safety of a static language.
122It's a joy to use.
123</p>
124
Rob Pikec765c092009-11-06 22:48:05 -0800125<h3>&hellip; open source</h3>
126
127<p>
Rob Piked10f1542009-11-08 22:02:15 -0800128<a href="/doc/install.html">Go for it</a>.
Rob Pikec765c092009-11-06 22:48:05 -0800129</p>
130
Adam Langleyb9ec2ad2009-11-03 19:59:45 -0800131</div>