Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Coding While Drunk

Coding While Drunk

「ハックガールズpresents システムライトニングトークBar Vol.2」のLT
http://www.zusaar.com/event/12437003

Kentaro Kuribayashi

July 17, 2014
Tweet

More Decks by Kentaro Kuribayashi

Other Decks in Technology

Transcript

  1. ศརπʔϧ࡞ͬͨ package main ! import ( "flag" "github.com/kentaro/gyo" "log" )

    ! var apiToken = flag.String("token", "", "API Token") var port = flag.Int("port", 8080, "Port of the server") var path = flag.String("path", "/callback", "Callback URL of the server") ! func init() { flag.Parse() } ! func main() { if *apiToken == "" { log.Fatalln("API token is required") } ! gyo := gyo.NewGyo(*apiToken) gyo.Server(*path, *port, func(username string) { gyo.Yo(username) log.Printf("Sent Yo to %s\n", username) }) ! return }