2009-10-22 00:13:36 -07:00
<!-- The Go Programming Language -->
2010-08-30 09:58:27 +10:00
< script type = "text/javascript" >
2009-11-03 19:59:45 -08:00
// On the frontpage we hide the header and navigation elements that other
// pages have.
document.getElementById('generatedHeader').style.display = 'none';
document.getElementById('nav').style.display = 'none';
< / script >
2010-03-20 11:42:57 +11:00
<!-- begin blog post widget JS/styles -->
2010-04-27 10:24:17 +10:00
< script src = "http://www.google.com/jsapi" type = "text/javascript" > < / script >
2010-03-20 11:42:57 +11:00
< script type = "text/javascript" >
2010-04-27 19:27:32 +10:00
function loadFeed() {
var url = "http://blog.golang.org/feeds/posts/default";
var divId = "blogFeed";
var feed = new google.feeds.Feed(url);
feed.setNumEntries(8)
feed.load(function (result) {
var container = document.getElementById(divId)
if (result.error) {
container.innerHTML = "Error loading feed.";
return;
}
container.innerHTML = "";
var entries = result.feed.entries;
for (var i=0; i< entries.length ; i + + ) {
var a = document.createElement("a");
a.setAttribute("href", entries[i].link);
a.appendChild(document.createTextNode(entries[i].title));
container.appendChild(a);
}
2010-03-20 11:42:57 +11:00
});
}
google.load("feeds", "1");
2010-04-27 19:27:32 +10:00
google.setOnLoadCallback(loadFeed);
2010-03-20 11:42:57 +11:00
< / script >
<!-- end blog post widget JS/styles -->
2009-11-03 19:59:45 -08:00
< table style = "padding-top: 1em; padding-bottom: 2em;" >
< tr >
< td >
2009-11-05 12:18:54 -08:00
< img style = "padding-right: 1em;" src = "/doc/go-logo-black.png" >
2009-11-03 19:59:45 -08:00
< / td >
< td >
2009-11-06 12:52:04 -08:00
< 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 >
2009-11-03 19:59:45 -08:00
< / td >
< / tr >
< / table >
2010-07-30 10:36:13 +10:00
< div id = "fp-videos" >
< h1 > Go videos< / h1 >
< div class = "video" >
< a href = "http://www.youtube.com/watch?v=jgVhBThJdXc" > < img src = "/doc/video-snap-io.jpg" > < / a >
< div class = "title" > "Go Programming"< / div >
< div class = "subtitle" > Google I/O Tech Talk< / div >
< / div >
< div class = "video" >
< a href = "http://www.youtube.com/watch?v=wwoWei-GAPo" > < img src = "/doc/video-snap-fastcompiles.jpg" > < / a >
< div class = "title" > "Fast Compiles"< / div >
< div class = "subtitle" > Go Promotional Video< / div >
< / div >
< div class = "video" >
< a href = "http://www.youtube.com/gocoding" > < img src = "/doc/video-snap-gocoding.jpg" > < / a >
< div class = "title" > Go Youtube Channel< / div >
< div class = "subtitle" > Screencasts and more< / div >
< / div >
< a class = "more" href = "/doc/go_learning.html#videos_talks" > More videos and talks.< / a >
< / div >
< div id = "frontpage" >
< div id = "blog" >
< h1 > From the < a href = "http://blog.golang.org" > Go Blog< / a > :< / h1 >
< div id = "blogFeed" > Loading...< / div >
< / div >
2010-08-27 14:14:42 +10:00
< p style = "font-size: 1.5em; font-weight: bold; margin-top: 0;" > Go is … < / p >
2009-11-03 19:59:45 -08:00
< h3 > … simple< / h3 >
< pre class = "code" >
package main
import "fmt"
func main() {
2009-11-05 13:39:00 -08:00
fmt.Printf("Hello, 世界\n")
2009-11-03 19:59:45 -08:00
}< / pre >
2010-07-30 10:36:13 +10:00
< p > Go has a small, simple feature set, making it easy to learn.< / p >
2009-11-03 19:59:45 -08:00
< h3 > … fast< / h3 >
2009-11-05 13:39:00 -08:00
< p >
Go 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.
< / p >
2009-11-03 19:59:45 -08:00
< h3 > … concurrent< / h3 >
2009-11-05 13:39:00 -08:00
< p >
2010-07-30 10:36:13 +10:00
Go promotes writing systems and servers as sets of lightweight communicating
processes, called goroutines, with strong support from the language. Run
thousands of goroutines if you want— and say good-bye to stack overflows.
2009-11-05 13:39:00 -08:00
< / p >
2010-07-30 10:36:13 +10:00
< h3 > … safe< / h3 >
< p > Go is type safe and memory safe. Go has pointers but no pointer arithmetic.
For random access, use slices, which know their limits.< / p >
2009-11-05 13:39:00 -08:00
< h3 > … fun< / h3 >
< p >
Go has fast builds, clean syntax, garbage collection,
methods for any type, and run-time reflection.
It feels like a dynamic language but has the speed and safety of a static language.
It's a joy to use.
< / p >
2009-11-06 22:48:05 -08:00
< h3 > … open source< / h3 >
< p >
2009-11-08 22:02:15 -08:00
< a href = "/doc/install.html" > Go for it< / a > .
2009-11-06 22:48:05 -08:00
< / p >
2009-11-03 19:59:45 -08:00
< / div >