This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"github.com/codegangsta/martini" | |
) | |
func main() { | |
// Martini setup | |
m := martini.Classic() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"github.com/codegangsta/martini" | |
) | |
func main() { | |
// Martini setup | |
m := martini.Classic() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"strings" | |
) | |
func main() { | |
s := []string{"ようこそ", "世界"} | |
fmt.Println(strings.Join(s, "")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"github.com/codegangsta/martini" | |
"github.com/codegangsta/martini-contrib/render" | |
) | |
func main() { | |
m := martini.Classic() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"github.com/codegangsta/martini" | |
"github.com/codegangsta/martini-contrib/render" | |
) | |
func main() { | |
m := martini.Classic() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- templates/hello.tmpl --> | |
<h2>Hello {{.}}!</h2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Martini Plz</title> | |
</head> | |
<body> | |
<!-- Render the current template here --> | |
{{ yield }} | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ goapp deploy -oauth | |
09:22 PM Application: takuan-osho; version: 1 | |
09:22 PM Host: appengine.google.com | |
09:22 PM | |
Starting update of app: takuan-osho, version: 1 | |
09:22 PM Getting current resource limits. | |
09:22 PM Scanning files on local disk. | |
09:22 PM Cloning 14 static files. | |
09:22 PM Cloning 90 application files. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.vm.box = "hashicorp/precise64" | |
# 下のconfig.vm.box_urlは特に使わなくても平気なのでコメントアウトするか削除する | |
# config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" | |
"strings" | |
"time" |