この記事は古いです。現在は misc/vim は存在しません。 vim-go を使うことを推奨します 準備: GOROOT と GOPATH の設定 vim にかぎらず、 Go を使う場合はGOROOT と GOPATH を設定しておきましょう。 GOROOT は Go をインストールした場所に、 GOPATH はあとで go get するときにインストールする場所を指定します。 export GOROOT=$HOME/local/go export GOPATH=$HOME/_go export PATH=$PATH:$GOROOT/bin:$GOPATH/bin ただし、 Go を自分でビルドした場合は、 GOROOT の設定はいりません。 go をビルドした時のターゲットディレクトリが自動的に使われます。 GOROOT を設定しないことで、複数のバージョンの go をインストールして
Go was born out of frustration with existing languages and environments for systems programming. Thus spake the Go FAQ. I empathize. I dislike C++ and Java so much that I’ve stayed with C. More precisely, I’ve stayed with GNU C, because of lexical closures and a few other extensions. Could Go replace C? Does Go truly combine efficient compilation, efficient execution, and ease of use? The best way
alias please=sudoKeeping a site like Tumblr alive and snappy for you to post at a moment’s notice, all day and night, is no small feat. Pesky crabs sneak into our data centers and cut cables all the time… If you want to help our small but excellent systems team, want to work from anywhere, and are deep into nginx, mysql, kubernetes, and caching, join us in this adventure. Or, if you have a friend
Wow. That third message, with suggestions for avoiding the bug, reads like a twisted joke. Highlights:"avoid struct types which contain both integer and pointer fields" "avoid data structures which form densely interconnected graphs at run-time" "avoid integer values which may alias at run-time to an address; make sure most integer values are fairly low (such as: below 10000)" I understand that th
Falcore has Moved Fitstar Falcore » The Fitstar fork has tons of updates that break backwards compatibility so we are leaving this repo live for reference of the older interfaces. It will no longer be maintained here, though so you should upgrade to the Fitstar fork. Falcore Falcore is a framework for constructing high performance, modular HTTP servers in Golang. Read more on our blog » GoPkgDoc h
Introducing Falcore and Timber at 8:27 PM BY DAVE GRIJALVA and SCOTT WHITE We're happy to announce that we've open-sourced some of the reusable tools we've built to ramp up our Go infrastructure. Falcore is a fast HTTP server with added functionality. Falcore includes production features that you'll really want when you put your application up on the net: Modular and flexible design and setup
Russ Cox, July 2011; updated by Shenghou Ma, May 2013 24 June 2011 At Scala Days 2011, Robert Hundt presented a paper titled Loop Recognition in C++/Java/Go/Scala. The paper implemented a specific loop finding algorithm, such as you might use in a flow analysis pass of a compiler, in C++, Go, Java, Scala, and then used those programs to draw conclusions about typical performance concerns in these
This document discusses Go programming concepts including concurrency, reflection, interfaces, and generics. It provides examples of using channels for concurrency, reflecting over types, implementing interfaces, and defining generic functions. The examples demonstrate capabilities like mapping and reducing over collections, duplicating values, and applying transformations.Read less
Inspired by (admittedly “ancient”) part 1 of a very instructive post series by Richard Jones and while waiting for Channels API support in Google’s new Go App Engine, I decided to make a quick port of Richard’s mochiconntest_web Erlang module to Go. Source first, discussion later (I’ve been quiet surprised to discover that GeSHi doesn’t support Go yet, thus no highlighting): package main import (
Andrew Gerrand, Rob Pike Web back-end languages tend to be a matter of "Speed, reliability, or simplicity: pick one." Not any more. The Go Programming Language is a rock-solid, productive, and high-performance platform for building web applications (and other types of software). Join the Go team for an entertaining, in-depth look at the development and deployment of a Go web application.
by Andrew Gerrand Go is a new open-source programming language with an emphasis on simplicity, comprehensibility, and efficiency. It has the speed and safety of a statically-typed language and the lightweight feel of a scripting language. It has a simple feature set that is easy to understand and powerful to use, including a novel type system and concurrent programming primitives. This talk wil
.app 1 .dev 1 #11WeeksOfAndroid 13 #11WeeksOfAndroid Android TV 1 #Android11 3 #DevFest16 1 #DevFest17 1 #DevFest18 1 #DevFest19 1 #DevFest20 1 #DevFest21 1 #DevFest22 1 #DevFest23 1 #hack4jp 3 11 weeks of Android 2 A MESSAGE FROM OUR CEO 1 A/B Testing 1 A4A 4 Accelerator 6 Accessibility 1 accuracy 1 Actions on Google 16 Activation Atlas 1 address validation API 1 Addy Osmani 1 ADK 2 AdMob 32 Ads
perl でいうと、Test::TCP::empty_port() が欲しかったのでちょっと書く。 import ( "net"; "fmt"; ) func empty_port() int { for port := 10000; port < 20000; port++ { addr := fmt.Sprintf("localhost:%d", port); l, err := net.Listen("tcp", addr); if (err == nil) { l.Close(); return port; } } panic("can't listen empty port"); } 空いてそうなポートを順番に Listen してみて、成功したら Close() してから返す。 ここで l は net.Listener 型の値なんだけど、ローカル変数にいれておいてもスコープから外
54行で分散KVSを実装する(レプリケーション機能付き)をみて、Go でとりあえず分散もレプリケーションもしないのを書いた。 といっても rpc ライブラリは付いてきているので、それを使うだけ。http://golang.org/pkg/rpc/ サーバ側の保存は map[string] string な変数を読み書きするだけ。単純ですね。 リポジトリはこちら http://github.com/fujiwara/go-simple-kvs クライアントのコードはこんな感じになります。 import ( "kvs"; "log"; ) func main() { // サーバに接続 client, err := kvs.NewClient("localhost:1975"); if err != nil { log.Exit("kvs error:", err); } var value
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く