├── Procfile ├── vendor ├── github.com │ ├── Sirupsen │ │ └── logrus │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── terminal_bsd.go │ │ │ ├── terminal_solaris.go │ │ │ ├── terminal_linux.go │ │ │ ├── hooks │ │ │ ├── syslog │ │ │ │ ├── syslog_test.go │ │ │ │ └── README.md │ │ │ └── test │ │ │ │ └── test_test.go │ │ │ ├── terminal_notwindows.go │ │ │ ├── doc.go │ │ │ ├── examples │ │ │ ├── hook │ │ │ │ └── hook.go │ │ │ └── basic │ │ │ │ └── basic.go │ │ │ ├── terminal_windows.go │ │ │ ├── json_formatter.go │ │ │ ├── LICENSE │ │ │ ├── hooks.go │ │ │ ├── writer.go │ │ │ └── formatters │ │ │ └── logstash │ │ │ └── logstash_test.go │ ├── gin-gonic │ │ └── gin │ │ │ ├── wercker.yml │ │ │ ├── .gitignore │ │ │ ├── logo.jpg │ │ │ ├── examples │ │ │ ├── app-engine │ │ │ │ ├── app.yaml │ │ │ │ ├── README.md │ │ │ │ └── hello.go │ │ │ ├── realtime-advanced │ │ │ │ ├── rooms.go │ │ │ │ └── main.go │ │ │ └── realtime-chat │ │ │ │ ├── rooms.go │ │ │ │ └── main.go │ │ │ ├── binding │ │ │ ├── example │ │ │ │ └── test.proto │ │ │ ├── xml.go │ │ │ ├── json.go │ │ │ ├── protobuf.go │ │ │ └── default_validator.go │ │ │ ├── helpers_test.go │ │ │ ├── ginS │ │ │ └── README.md │ │ │ ├── deprecated.go │ │ │ ├── render │ │ │ ├── data.go │ │ │ ├── xml.go │ │ │ ├── redirect.go │ │ │ ├── yaml.go │ │ │ ├── text.go │ │ │ ├── render.go │ │ │ └── json.go │ │ │ ├── .travis.yml │ │ │ ├── mode_test.go │ │ │ ├── Godeps │ │ │ └── Godeps.json │ │ │ ├── fs.go │ │ │ ├── LICENSE │ │ │ └── recovery_test.go │ ├── urfave │ │ └── cli │ │ │ ├── .gitignore │ │ │ ├── autocomplete │ │ │ ├── zsh_autocomplete │ │ │ └── bash_autocomplete │ │ │ ├── altsrc │ │ │ ├── helpers_test.go │ │ │ └── input_source_context.go │ │ │ ├── appveyor.yml │ │ │ ├── cli.go │ │ │ ├── helpers_test.go │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── category.go │ │ │ ├── errors_test.go │ │ │ └── funcs.go │ ├── googollee │ │ ├── go-engine.io │ │ │ ├── parser │ │ │ │ ├── parser.go │ │ │ │ └── limit_reader.go │ │ │ ├── message │ │ │ │ └── message.go │ │ │ ├── .travis.yml │ │ │ ├── example │ │ │ │ ├── asset │ │ │ │ │ ├── style.css │ │ │ │ │ └── index.html │ │ │ │ └── main.go │ │ │ ├── polling │ │ │ │ ├── xhr.go │ │ │ │ ├── try_locker.go │ │ │ │ ├── writer.go │ │ │ │ └── try_locker_test.go │ │ │ ├── websocket │ │ │ │ └── websocket.go │ │ │ ├── sessions_test.go │ │ │ ├── sessions.go │ │ │ └── ioutil.go │ │ └── go-socket.io │ │ │ ├── .travis.yml │ │ │ ├── main.go │ │ │ ├── ioutil.go │ │ │ ├── trim_writer.go │ │ │ ├── helper_test.go │ │ │ ├── namespace.go │ │ │ └── message_reader.go │ ├── manucorporat │ │ └── sse │ │ │ ├── .travis.yml │ │ │ ├── writer.go │ │ │ └── LICENSE │ ├── moul │ │ ├── shikaku │ │ │ ├── contrib │ │ │ │ └── docker │ │ │ │ │ └── Dockerfile │ │ │ ├── cmd │ │ │ │ └── appspot │ │ │ │ │ ├── app.yaml │ │ │ │ │ └── .playground │ │ │ ├── .goxc.json │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ └── LICENSE │ │ └── http2curl │ │ │ ├── Godeps │ │ │ ├── Readme │ │ │ └── Godeps.json │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── Makefile │ │ │ └── LICENSE │ ├── golang │ │ └── protobuf │ │ │ ├── AUTHORS │ │ │ ├── CONTRIBUTORS │ │ │ └── .gitignore │ ├── gorilla │ │ └── websocket │ │ │ ├── AUTHORS │ │ │ ├── .travis.yml │ │ │ ├── .gitignore │ │ │ ├── examples │ │ │ ├── autobahn │ │ │ │ ├── README.md │ │ │ │ └── fuzzingclient.json │ │ │ ├── filewatch │ │ │ │ └── README.md │ │ │ ├── echo │ │ │ │ └── README.md │ │ │ ├── command │ │ │ │ └── README.md │ │ │ └── chat │ │ │ │ ├── README.md │ │ │ │ ├── main.go │ │ │ │ └── hub.go │ │ │ ├── conn_read.go │ │ │ ├── bench_test.go │ │ │ ├── conn_read_legacy.go │ │ │ └── LICENSE │ └── parnurzeal │ │ └── gorequest │ │ ├── .travis.yml │ │ ├── .gitignore │ │ └── LICENSE ├── golang.org │ └── x │ │ └── net │ │ ├── codereview.cfg │ │ ├── http2 │ │ ├── .gitignore │ │ ├── h2demo │ │ │ ├── rootCA.srl │ │ │ ├── .gitignore │ │ │ ├── Makefile │ │ │ ├── README │ │ │ └── server.crt │ │ ├── Makefile │ │ ├── not_go15.go │ │ ├── go15.go │ │ ├── not_go16.go │ │ ├── errors_test.go │ │ ├── README │ │ ├── gotrack_test.go │ │ └── flow.go │ │ ├── .gitignore │ │ ├── html │ │ ├── charset │ │ │ └── testdata │ │ │ │ ├── UTF-16BE-BOM.html │ │ │ │ ├── UTF-16LE-BOM.html │ │ │ │ └── README │ │ ├── testdata │ │ │ └── webkit │ │ │ │ ├── pending-spec-changes-plain-text-unsafe.dat │ │ │ │ ├── scripted │ │ │ │ ├── adoption01.dat │ │ │ │ └── webkit01.dat │ │ │ │ ├── adoption02.dat │ │ │ │ ├── inbody01.dat │ │ │ │ ├── isindex.dat │ │ │ │ ├── tests4.dat │ │ │ │ └── tests24.dat │ │ ├── example_test.go │ │ └── entity_test.go │ │ ├── README │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── ipv4 │ │ ├── thunk_linux_386.s │ │ ├── sockopt_stub.go │ │ ├── sys_stub.go │ │ ├── payload.go │ │ ├── mocktransponder_test.go │ │ ├── sockopt_asmreqn_stub.go │ │ ├── sockopt_ssmreq_stub.go │ │ ├── icmp_stub.go │ │ ├── helper_stub.go │ │ ├── control_stub.go │ │ ├── sockopt_asmreq_stub.go │ │ ├── icmp_linux.go │ │ ├── zsys_netbsd.go │ │ ├── zsys_openbsd.go │ │ ├── control_windows.go │ │ ├── zsys_dragonfly.go │ │ ├── genericopt_stub.go │ │ ├── syscall_unix.go │ │ ├── syscall_linux_386.go │ │ ├── control_pktinfo.go │ │ ├── defs_netbsd.go │ │ ├── defs_openbsd.go │ │ ├── defs_dragonfly.go │ │ ├── helper.go │ │ ├── control_bsd.go │ │ ├── sockopt_asmreqn_unix.go │ │ ├── sys_openbsd.go │ │ ├── helper_unix.go │ │ ├── sys_bsd.go │ │ └── iana.go │ │ ├── ipv6 │ │ ├── thunk_linux_386.s │ │ ├── sys_stub.go │ │ ├── sockopt_stub.go │ │ ├── payload.go │ │ ├── helper_stub.go │ │ ├── sockopt_ssmreq_stub.go │ │ ├── icmp_stub.go │ │ ├── control_stub.go │ │ ├── icmp_solaris.go │ │ ├── sockopt_asmreq_windows.go │ │ ├── sockopt_asmreq_unix.go │ │ ├── icmp_windows.go │ │ ├── icmp_linux.go │ │ ├── mocktransponder_test.go │ │ ├── control_windows.go │ │ ├── icmp_bsd.go │ │ ├── syscall_unix.go │ │ ├── genericopt_stub.go │ │ ├── helper.go │ │ ├── syscall_linux_386.go │ │ ├── helper_unix.go │ │ └── helper_windows.go │ │ ├── internal │ │ └── nettest │ │ │ ├── rlimit_windows.go │ │ │ ├── rlimit_stub.go │ │ │ ├── error_stub.go │ │ │ ├── rlimit.go │ │ │ ├── stack_stub.go │ │ │ ├── rlimit_unix.go │ │ │ ├── stack_unix.go │ │ │ ├── error_posix.go │ │ │ ├── stack.go │ │ │ └── stack_windows.go │ │ ├── icmp │ │ ├── sys_freebsd.go │ │ ├── ipv6.go │ │ ├── listen_stub.go │ │ ├── timeexceeded.go │ │ ├── dstunreach.go │ │ ├── echo.go │ │ ├── messagebody.go │ │ └── packettoobig.go │ │ ├── .gitattributes │ │ ├── proxy │ │ └── direct.go │ │ ├── webdav │ │ └── internal │ │ │ └── xml │ │ │ └── README │ │ ├── context │ │ ├── ctxhttp │ │ │ ├── cancelreq.go │ │ │ └── cancelreq_go14.go │ │ └── withtimeout_test.go │ │ ├── websocket │ │ ├── examplehandler_test.go │ │ └── exampledial_test.go │ │ ├── CONTRIBUTING.md │ │ ├── trace │ │ └── trace_test.go │ │ ├── idna │ │ └── idna_test.go │ │ ├── netutil │ │ └── listen.go │ │ └── PATENTS └── gopkg.in │ ├── go-playground │ └── validator.v8 │ │ ├── logo.png │ │ ├── .gitignore │ │ ├── LICENSE │ │ └── examples │ │ └── custom │ │ └── custom.go │ └── yaml.v2 │ ├── .travis.yml │ └── suite_test.go ├── bolosseum.go ├── rancher └── Bolosseum │ ├── rancher-compose.yml │ └── docker-compose.yml ├── renovate.json ├── .dockerignore ├── .travis.yml ├── Dockerfile ├── stupid-ias ├── stupid-ias.go ├── russianbullet │ └── russianbullet.go ├── guessnumber │ └── guessnumber.go ├── coinflip │ └── coinflip.go ├── tictactoe │ └── tictactoe.go └── connectfour │ └── connectfour.go ├── sdks └── go │ └── golang-sdk.go ├── games ├── bots-based-game.go └── game.go ├── docker-compose.yml ├── test ├── russianbullet.sh ├── coinflip.sh └── coinflip.py ├── .gitignore ├── pkg └── log │ ├── bolosseum_logger.go │ └── log.go ├── glide.yaml ├── bots ├── stupidbot │ └── stupidbot.go ├── stdinbot │ └── stdinbot.go └── filebot │ └── filebot.go ├── LICENSE ├── circle.yml └── Makefile /Procfile: -------------------------------------------------------------------------------- 1 | web: bolosseum server --bind-address=:$PORT 2 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/.gitignore: -------------------------------------------------------------------------------- 1 | logrus 2 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/wercker.yml: -------------------------------------------------------------------------------- 1 | box: wercker/default -------------------------------------------------------------------------------- /vendor/golang.org/x/net/codereview.cfg: -------------------------------------------------------------------------------- 1 | issuerepo: golang/go 2 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | h2i/h2i 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/h2demo/rootCA.srl: -------------------------------------------------------------------------------- 1 | E2CE26BF3285059C 2 | -------------------------------------------------------------------------------- /bolosseum.go: -------------------------------------------------------------------------------- 1 | package bolosseum 2 | 3 | var VERSION = "0.0.0+dev" 4 | -------------------------------------------------------------------------------- /rancher/Bolosseum/rancher-compose.yml: -------------------------------------------------------------------------------- 1 | bolosseum-server: 2 | scale: 2 3 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "config:base" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/.gitignore: -------------------------------------------------------------------------------- 1 | *.coverprofile 2 | node_modules/ 3 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | Dockerfile 2 | #vendor/ 3 | .git 4 | *~ 5 | .#* 6 | *# 7 | /bolosseum 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/Makefile: -------------------------------------------------------------------------------- 1 | curlimage: 2 | docker build -t gohttp2/curl . 3 | 4 | -------------------------------------------------------------------------------- /vendor/github.com/googollee/go-engine.io/parser/parser.go: -------------------------------------------------------------------------------- 1 | package parser 2 | 3 | const Protocol = 3 4 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/.gitignore: -------------------------------------------------------------------------------- 1 | Godeps/* 2 | !Godeps/Godeps.json 3 | coverage.out 4 | count.out 5 | -------------------------------------------------------------------------------- /vendor/github.com/manucorporat/sse/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | go: 4 | - 1.3 5 | - 1.4 6 | - tip 7 | -------------------------------------------------------------------------------- /vendor/github.com/moul/shikaku/contrib/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM scratch 2 | ADD ./shikaku /shikaku 3 | ENTRYPOINT ["/shikaku"] 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/.gitignore: -------------------------------------------------------------------------------- 1 | # Add no patterns to .hgignore except for files generated by the build. 2 | last-change 3 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moul/bolosseum/master/vendor/github.com/gin-gonic/gin/logo.jpg -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/h2demo/.gitignore: -------------------------------------------------------------------------------- 1 | h2demo 2 | h2demo.linux 3 | client-id.dat 4 | client-secret.dat 5 | token.dat 6 | -------------------------------------------------------------------------------- /vendor/gopkg.in/go-playground/validator.v8/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moul/bolosseum/master/vendor/gopkg.in/go-playground/validator.v8/logo.png -------------------------------------------------------------------------------- /rancher/Bolosseum/docker-compose.yml: -------------------------------------------------------------------------------- 1 | bolosseum-server: 2 | labels: 3 | io.rancher.container.pull_image: always 4 | tty: true 5 | image: moul/bolosseum:latest 6 | -------------------------------------------------------------------------------- /vendor/github.com/googollee/go-socket.io/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 1.5 3 | install: 4 | - go get "github.com/smartystreets/goconvey/convey" 5 | - go get -v . 6 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.4 5 | - 1.5 6 | - 1.6 7 | - tip 8 | 9 | go_import_path: gopkg.in/yaml.v2 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/html/charset/testdata/UTF-16BE-BOM.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moul/bolosseum/master/vendor/golang.org/x/net/html/charset/testdata/UTF-16BE-BOM.html -------------------------------------------------------------------------------- /vendor/golang.org/x/net/html/charset/testdata/UTF-16LE-BOM.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moul/bolosseum/master/vendor/golang.org/x/net/html/charset/testdata/UTF-16LE-BOM.html -------------------------------------------------------------------------------- /vendor/github.com/moul/shikaku/cmd/appspot/app.yaml: -------------------------------------------------------------------------------- 1 | application: shikaku 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: / 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/examples/app-engine/app.yaml: -------------------------------------------------------------------------------- 1 | application: hello 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app -------------------------------------------------------------------------------- /vendor/github.com/googollee/go-engine.io/message/message.go: -------------------------------------------------------------------------------- 1 | package message 2 | 3 | type MessageType int 4 | 5 | const ( 6 | MessageText MessageType = iota 7 | MessageBinary 8 | ) 9 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/README: -------------------------------------------------------------------------------- 1 | This repository holds supplementary Go networking libraries. 2 | 3 | To submit changes to this repository, see http://golang.org/doc/contribute.html. 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: required 2 | 3 | services: 4 | - docker 5 | 6 | script: 7 | - docker build -t moul/bolosseum . 8 | - docker run -it --rm moul/bolosseum bolosseum run tictactoe stupid stupid 9 | -------------------------------------------------------------------------------- /vendor/github.com/moul/http2curl/Godeps/Readme: -------------------------------------------------------------------------------- 1 | This directory tree is generated automatically by godep. 2 | 3 | Please do not edit. 4 | 5 | See https://github.com/tools/godep for more information. 6 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.14 2 | COPY . /go/src/github.com/moul/bolosseum 3 | WORKDIR /go/src/github.com/moul/bolosseum 4 | RUN go install -v ./cmd/bolosseum 5 | CMD ["bolosseum", "server"] 6 | EXPOSE 9000 7 | -------------------------------------------------------------------------------- /vendor/github.com/googollee/go-engine.io/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 1.5 3 | install: 4 | - go get "github.com/smartystreets/goconvey/convey" 5 | - go get -v . 6 | script: 7 | - go test -race -v ./... 8 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/autocomplete/zsh_autocomplete: -------------------------------------------------------------------------------- 1 | autoload -U compinit && compinit 2 | autoload -U bashcompinit && bashcompinit 3 | 4 | script_dir=$(dirname $0) 5 | source ${script_dir}/bash_autocomplete 6 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/github.com/googollee/go-socket.io/main.go: -------------------------------------------------------------------------------- 1 | /* 2 | go-socket.io is a server implementation of socket.io in golang. 3 | 4 | It is compatible with the official Node.js implementation. 5 | */ 6 | package socketio 7 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/github.com/moul/shikaku/cmd/appspot/.playground: -------------------------------------------------------------------------------- 1 | { 2 | "project_name": "Shikaku", 3 | "project_description": "Shikaku generator", 4 | "show_files": [ 5 | "app.go", 6 | "app.yaml" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /stupid-ias/stupid-ias.go: -------------------------------------------------------------------------------- 1 | package stupidias 2 | 3 | import "github.com/moul/bolosseum/bots" 4 | 5 | type StupidIA interface { 6 | Init(bots.QuestionMessage) *bots.ReplyMessage 7 | PlayTurn(bots.QuestionMessage) *bots.ReplyMessage 8 | } 9 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/suite_test.go: -------------------------------------------------------------------------------- 1 | package yaml_test 2 | 3 | import ( 4 | . "gopkg.in/check.v1" 5 | "testing" 6 | ) 7 | 8 | func Test(t *testing.T) { TestingT(t) } 9 | 10 | type S struct{} 11 | 12 | var _ = Suite(&S{}) 13 | -------------------------------------------------------------------------------- /sdks/go/golang-sdk.go: -------------------------------------------------------------------------------- 1 | package bolosseumbot 2 | 3 | import "github.com/moul/bolosseum/bots" 4 | 5 | type BolosseumBot interface { 6 | Init(bots.QuestionMessage) *bots.ReplyMessage 7 | PlayTurn(bots.QuestionMessage) *bots.ReplyMessage 8 | } 9 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/html/testdata/webkit/pending-spec-changes-plain-text-unsafe.dat: -------------------------------------------------------------------------------- 1 | #data 2 | fillertext 3 | #errors 4 | #document 5 | | 6 | | 7 | | 8 | | "fillertext" 9 | |
10 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.3 4 | - 1.4 5 | - 1.5 6 | - 1.6 7 | - tip 8 | install: 9 | - go get -t ./... 10 | script: GOMAXPROCS=4 GORACE="halt_on_error=1" go test -race -v ./... 11 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd openbsd netbsd dragonfly 2 | 3 | package logrus 4 | 5 | import "syscall" 6 | 7 | const ioctlReadTermios = syscall.TIOCGETA 8 | 9 | type Termios syscall.Termios 10 | -------------------------------------------------------------------------------- /vendor/github.com/googollee/go-engine.io/example/asset/style.css: -------------------------------------------------------------------------------- 1 | 2 | body { margin: 0; padding: 0; font-family: Helvetica Neue; } 3 | h1 { margin: 100px 100px 10px; } 4 | h2 { color: #999; margin: 0 100px 30px; font-weight: normal; } 5 | #latency { color: red; } 6 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of Gorilla WebSocket authors for copyright 2 | # purposes. 3 | # 4 | # Please keep the list sorted. 5 | 6 | Gary Burd 7 | Joachim Bauch 8 | 9 | -------------------------------------------------------------------------------- /games/bots-based-game.go: -------------------------------------------------------------------------------- 1 | package games 2 | 3 | import "github.com/moul/bolosseum/bots" 4 | 5 | type BotsBasedGame struct { 6 | Game 7 | Bots []bots.Bot 8 | } 9 | 10 | func (g *BotsBasedGame) RegisterBot(bot bots.Bot) { 11 | g.Bots = append(g.Bots, bot) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.[568ao] 3 | *.pb.go 4 | *.ao 5 | *.so 6 | *.pyc 7 | ._* 8 | .nfs.* 9 | [568a].out 10 | *~ 11 | *.orig 12 | core 13 | _obj 14 | _test 15 | _testmain.go 16 | compiler/protoc-gen-go 17 | compiler/testdata/extension_test 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/thunk_linux_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.2 6 | 7 | TEXT ·socketcall(SB),4,$0-36 8 | JMP syscall·socketcall(SB) 9 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv6/thunk_linux_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.2 6 | 7 | TEXT ·socketcall(SB),4,$0-36 8 | JMP syscall·socketcall(SB) 9 | -------------------------------------------------------------------------------- /vendor/github.com/googollee/go-engine.io/polling/xhr.go: -------------------------------------------------------------------------------- 1 | package polling 2 | 3 | import ( 4 | "github.com/googollee/go-engine.io/transport" 5 | ) 6 | 7 | var Creater = transport.Creater{ 8 | Name: "polling", 9 | Upgrading: false, 10 | Server: NewServer, 11 | Client: NewClient, 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/googollee/go-engine.io/websocket/websocket.go: -------------------------------------------------------------------------------- 1 | package websocket 2 | 3 | import ( 4 | "github.com/googollee/go-engine.io/transport" 5 | ) 6 | 7 | var Creater = transport.Creater{ 8 | Name: "websocket", 9 | Upgrading: true, 10 | Server: NewServer, 11 | Client: NewClient, 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/binding/example/test.proto: -------------------------------------------------------------------------------- 1 | package example; 2 | 3 | enum FOO {X=17;}; 4 | 5 | message Test { 6 | required string label = 1; 7 | optional int32 type = 2[default=77]; 8 | repeated int64 reps = 3; 9 | optional group OptionalGroup = 4{ 10 | required string RequiredField = 5; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/helpers_test.go: -------------------------------------------------------------------------------- 1 | package gin 2 | 3 | import ( 4 | "net/http/httptest" 5 | ) 6 | 7 | func CreateTestContext() (c *Context, w *httptest.ResponseRecorder, r *Engine) { 8 | w = httptest.NewRecorder() 9 | r = New() 10 | c = r.allocateContext() 11 | c.reset() 12 | c.writermem.reset(w) 13 | return 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/h2demo/Makefile: -------------------------------------------------------------------------------- 1 | h2demo.linux: h2demo.go 2 | GOOS=linux go build --tags=h2demo -o h2demo.linux . 3 | 4 | FORCE: 5 | 6 | upload: FORCE 7 | go install golang.org/x/build/cmd/upload 8 | upload --verbose --osarch=linux-amd64 --tags=h2demo --file=go:golang.org/x/net/http2/h2demo --public http2-demo-server-tls/h2demo 9 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/nettest/rlimit_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package nettest 6 | 7 | func maxOpenFiles() int { return 4 * defaultMaxOpenFiles /* actually it's 16581375 */ } 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/nettest/rlimit_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build nacl plan9 6 | 7 | package nettest 8 | 9 | func maxOpenFiles() int { return defaultMaxOpenFiles } 10 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | 3 | services: 4 | bolosseum: 5 | build: . 6 | ports: 7 | - 9000 8 | environment: 9 | - VIRTUAL_HOST=bolosseum.m.42.am 10 | - VIRTUAL_PORT=9000 11 | networks: 12 | - default 13 | - service-proxy 14 | 15 | networks: 16 | service-proxy: 17 | external: true 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/icmp/sys_freebsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package icmp 6 | 7 | import "syscall" 8 | 9 | func init() { 10 | freebsdVersion, _ = syscall.SysctlUint32("kern.osreldate") 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/nettest/error_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build nacl plan9 6 | 7 | package nettest 8 | 9 | func protocolNotSupported(err error) bool { 10 | return false 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/not_go15.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !go1.5 6 | 7 | package http2 8 | 9 | import "net/http" 10 | 11 | func requestCancel(req *http.Request) <-chan struct{} { return nil } 12 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/ginS/README.md: -------------------------------------------------------------------------------- 1 | #Gin Default Server 2 | 3 | This is API experiment for Gin. 4 | 5 | ```go 6 | package main 7 | 8 | import ( 9 | "github.com/gin-gonic/gin" 10 | "github.com/gin-gonic/gin/ginS" 11 | ) 12 | 13 | func main() { 14 | ginS.GET("/", func(c *gin.Context) { c.String(200, "Hello World") }) 15 | ginS.Run() 16 | } 17 | ``` 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/go15.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.5 6 | 7 | package http2 8 | 9 | import "net/http" 10 | 11 | func requestCancel(req *http.Request) <-chan struct{} { return req.Cancel } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/sockopt_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build nacl plan9 solaris 6 | 7 | package ipv4 8 | 9 | func setInt(fd int, opt *sockOpt, v int) error { 10 | return errOpNoSupport 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_solaris.go: -------------------------------------------------------------------------------- 1 | // +build solaris 2 | 3 | package logrus 4 | 5 | import ( 6 | "os" 7 | 8 | "golang.org/x/sys/unix" 9 | ) 10 | 11 | // IsTerminal returns true if the given file descriptor is a terminal. 12 | func IsTerminal() bool { 13 | _, err := unix.IoctlGetTermios(int(os.Stdout.Fd()), unix.TCGETA) 14 | return err == nil 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/parnurzeal/gorequest/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.4 4 | - 1.3 5 | - 1.2 6 | install: 7 | - go get github.com/elazarl/goproxy 8 | - go get github.com/moul/http2curl 9 | - go get golang.org/x/net/publicsuffix 10 | notifications: 11 | email: 12 | recipients: parnurzeal@gmail.com 13 | on_success: change 14 | on_failure: always 15 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_linux.go: -------------------------------------------------------------------------------- 1 | // Based on ssh/terminal: 2 | // Copyright 2013 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | package logrus 7 | 8 | import "syscall" 9 | 10 | const ioctlReadTermios = syscall.TCGETS 11 | 12 | type Termios syscall.Termios 13 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | 4 | matrix: 5 | include: 6 | - go: 1.4 7 | - go: 1.5 8 | - go: 1.6 9 | - go: tip 10 | allow_failures: 11 | - go: tip 12 | 13 | script: 14 | - go get -t -v ./... 15 | - diff -u <(echo -n) <(gofmt -d .) 16 | - go vet $(go list ./... | grep -v /vendor/) 17 | - go test -v -race ./... 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/sys_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build nacl plan9 solaris 6 | 7 | package ipv4 8 | 9 | type sysSockoptLen int32 10 | 11 | var ( 12 | ctlOpts = [ctlMax]ctlOpt{} 13 | 14 | sockOpts = [ssoMax]sockOpt{} 15 | ) 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv6/sys_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build nacl plan9 solaris 6 | 7 | package ipv6 8 | 9 | type sysSockoptLen int32 10 | 11 | var ( 12 | ctlOpts = [ctlMax]ctlOpt{} 13 | 14 | sockOpts = [ssoMax]sockOpt{} 15 | ) 16 | -------------------------------------------------------------------------------- /vendor/github.com/parnurzeal/gorequest/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | tags 24 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/not_go16.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !go1.6 6 | 7 | package http2 8 | 9 | import "net/http" 10 | 11 | func configureTransport(t1 *http.Transport) (*Transport, error) { 12 | return nil, errTransportVersion 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | 24 | .idea/ 25 | *.iml -------------------------------------------------------------------------------- /vendor/github.com/moul/http2curl/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/html/testdata/webkit/scripted/adoption01.dat: -------------------------------------------------------------------------------- 1 | #data 2 |

TEXT 3 | #errors 4 | #document 5 | | 6 | | 7 | | 8 | |

9 | | 10 | | id="B" 11 | | 13 | 14 | 15 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/autocomplete/bash_autocomplete: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | : ${PROG:=$(basename ${BASH_SOURCE})} 4 | 5 | _cli_bash_autocomplete() { 6 | local cur opts base 7 | COMPREPLY=() 8 | cur="${COMP_WORDS[COMP_CWORD]}" 9 | opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} --generate-bash-completion ) 10 | COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) 11 | return 0 12 | } 13 | 14 | complete -F _cli_bash_autocomplete $PROG 15 | -------------------------------------------------------------------------------- /test/russianbullet.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "${0}: << ${1}" >&2 4 | 5 | send() { 6 | echo "${0}: >> ${@}" >&2 7 | echo "${@}" 8 | } 9 | 10 | action="$(echo ${1} | jq -r .action)" 11 | 12 | case $action in 13 | init) 14 | send '{"name": "bot1"}' 15 | ;; 16 | play-turn) 17 | send '{"play": "click !"}' 18 | ;; 19 | *) 20 | send '{"error": "not implemented action: '${action}'"}' 21 | ;; 22 | esac 23 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/examples/filewatch/README.md: -------------------------------------------------------------------------------- 1 | # File Watch example. 2 | 3 | This example sends a file to the browser client for display whenever the file is modified. 4 | 5 | $ go get github.com/gorilla/websocket 6 | $ cd `go list -f '{{.Dir}}' github.com/gorilla/websocket/examples/filewatch` 7 | $ go run main.go 8 | # Open http://localhost:8080/ . 9 | # Modify the file to see it update in the browser. 10 | -------------------------------------------------------------------------------- /vendor/gopkg.in/go-playground/validator.v8/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | *.test 26 | *.out 27 | *.txt 28 | cover.html 29 | README.html -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | #vendor/ 2 | *~ 3 | .#* 4 | *# 5 | 6 | /bolosseum 7 | test/tictactoe* 8 | test/connect-four 9 | 10 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 11 | *.o 12 | *.a 13 | *.so 14 | 15 | # Folders 16 | _obj 17 | _test 18 | 19 | # Architecture specific extensions/prefixes 20 | *.[568vq] 21 | [568vq].out 22 | 23 | *.cgo1.go 24 | *.cgo2.c 25 | _cgo_defun.c 26 | _cgo_gotypes.go 27 | _cgo_export.* 28 | 29 | _testmain.go 30 | 31 | *.exe 32 | *.test 33 | *.prof 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/payload.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package ipv4 6 | 7 | import "net" 8 | 9 | // A payloadHandler represents the IPv4 datagram payload handler. 10 | type payloadHandler struct { 11 | net.PacketConn 12 | rawOpt 13 | } 14 | 15 | func (c *payloadHandler) ok() bool { return c != nil && c.PacketConn != nil } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv6/payload.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package ipv6 6 | 7 | import "net" 8 | 9 | // A payloadHandler represents the IPv6 datagram payload handler. 10 | type payloadHandler struct { 11 | net.PacketConn 12 | rawOpt 13 | } 14 | 15 | func (c *payloadHandler) ok() bool { return c != nil && c.PacketConn != nil } 16 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/conn_read.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Gorilla WebSocket Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.5 6 | 7 | package websocket 8 | 9 | import "io" 10 | 11 | func (c *Conn) read(n int) ([]byte, error) { 12 | p, err := c.br.Peek(n) 13 | if err == io.EOF { 14 | err = errUnexpectedEOF 15 | } 16 | c.br.Discard(len(p)) 17 | return p, err 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/moul/shikaku/.gitignore: -------------------------------------------------------------------------------- 1 | contrib/docker/shikaku 2 | contrib/docker/.docker-container-built 3 | /shikakugen 4 | 5 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 6 | *.o 7 | *.a 8 | *.so 9 | 10 | # Folders 11 | _obj 12 | _test 13 | 14 | # Architecture specific extensions/prefixes 15 | *.[568vq] 16 | [568vq].out 17 | 18 | *.cgo1.go 19 | *.cgo2.c 20 | _cgo_defun.c 21 | _cgo_gotypes.go 22 | _cgo_export.* 23 | 24 | _testmain.go 25 | 26 | *.exe 27 | *.test 28 | *.prof 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/proxy/direct.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package proxy 6 | 7 | import ( 8 | "net" 9 | ) 10 | 11 | type direct struct{} 12 | 13 | // Direct is a direct proxy: one that makes network connections directly. 14 | var Direct = direct{} 15 | 16 | func (direct) Dial(network, addr string) (net.Conn, error) { 17 | return net.Dial(network, addr) 18 | } 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/html/charset/testdata/README: -------------------------------------------------------------------------------- 1 | These test cases come from 2 | http://www.w3.org/International/tests/repository/html5/the-input-byte-stream/results-basics 3 | 4 | Distributed under both the W3C Test Suite License 5 | (http://www.w3.org/Consortium/Legal/2008/04-testsuite-license) 6 | and the W3C 3-clause BSD License 7 | (http://www.w3.org/Consortium/Legal/2008/03-bsd-license). 8 | To contribute to a W3C Test Suite, see the policies and contribution 9 | forms (http://www.w3.org/2004/10/27-testcases). 10 | -------------------------------------------------------------------------------- /games/game.go: -------------------------------------------------------------------------------- 1 | package games 2 | 3 | import "github.com/moul/bolosseum/bots" 4 | 5 | type GameStep struct { 6 | Error error 7 | QuestionMessage *bots.QuestionMessage 8 | ReplyMessage *bots.ReplyMessage 9 | Message string 10 | Winner bots.Bot 11 | Loser bots.Bot 12 | Draw bool 13 | } 14 | 15 | type Game interface { 16 | Run(string, chan GameStep) error 17 | Name() string 18 | CheckArgs([]string) error 19 | RegisterBot(bots.Bot) 20 | GetAsciiOutput() []byte 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/mocktransponder_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package ipv4_test 6 | 7 | import ( 8 | "net" 9 | "testing" 10 | ) 11 | 12 | func acceptor(t *testing.T, ln net.Listener, done chan<- bool) { 13 | defer func() { done <- true }() 14 | 15 | c, err := ln.Accept() 16 | if err != nil { 17 | t.Error(err) 18 | return 19 | } 20 | c.Close() 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/webdav/internal/xml/README: -------------------------------------------------------------------------------- 1 | This is a fork of the encoding/xml package at ca1d6c4, the last commit before 2 | https://go.googlesource.com/go/+/c0d6d33 "encoding/xml: restore Go 1.4 name 3 | space behavior" made late in the lead-up to the Go 1.5 release. 4 | 5 | The list of encoding/xml changes is at 6 | https://go.googlesource.com/go/+log/master/src/encoding/xml 7 | 8 | This fork is temporary, and I (nigeltao) expect to revert it after Go 1.6 is 9 | released. 10 | 11 | See http://golang.org/issue/11841 12 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/bench_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Gorilla WebSocket Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package websocket 6 | 7 | import ( 8 | "testing" 9 | ) 10 | 11 | func BenchmarkMaskBytes(b *testing.B) { 12 | var key [4]byte 13 | data := make([]byte, 1024) 14 | pos := 0 15 | for i := 0; i < b.N; i++ { 16 | pos = maskBytes(key, pos, data) 17 | } 18 | b.SetBytes(int64(len(data))) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/manucorporat/sse/writer.go: -------------------------------------------------------------------------------- 1 | package sse 2 | 3 | import "io" 4 | 5 | type stringWriter interface { 6 | io.Writer 7 | WriteString(string) (int, error) 8 | } 9 | 10 | type stringWrapper struct { 11 | io.Writer 12 | } 13 | 14 | func (w stringWrapper) WriteString(str string) (int, error) { 15 | return w.Writer.Write([]byte(str)) 16 | } 17 | 18 | func checkWriter(writer io.Writer) stringWriter { 19 | if w, ok := writer.(stringWriter); ok { 20 | return w 21 | } else { 22 | return stringWrapper{writer} 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/moul/http2curl/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | #- 1.1 5 | - 1.2 6 | - 1.3 7 | - 1.4 8 | - 1.5 9 | - tip 10 | 11 | env: 12 | - GO15VENDOREXPERIMENT=1 13 | 14 | matrix: 15 | allow_failures: 16 | - go: tip 17 | 18 | before_install: 19 | - go get -u github.com/axw/gocov/gocov 20 | - go get -u github.com/mattn/goveralls 21 | - go get golang.org/x/tools/cmd/cover 22 | 23 | script: 24 | - make build 25 | - make test 26 | - make cover 27 | - goveralls -service=travis-ci -v -covermode=count -coverprofile=profile.out 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/context/ctxhttp/cancelreq.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.5 6 | 7 | package ctxhttp 8 | 9 | import "net/http" 10 | 11 | func canceler(client *http.Client, req *http.Request) func() { 12 | // TODO(djd): Respect any existing value of req.Cancel. 13 | ch := make(chan struct{}) 14 | req.Cancel = ch 15 | 16 | return func() { 17 | close(ch) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/examples/app-engine/README.md: -------------------------------------------------------------------------------- 1 | # Guide to run Gin under App Engine LOCAL Development Server 2 | 3 | 1. Download, install and setup Go in your computer. (That includes setting your `$GOPATH`.) 4 | 2. Download SDK for your platform from here: `https://developers.google.com/appengine/downloads?hl=es#Google_App_Engine_SDK_for_Go` 5 | 3. Download Gin source code using: `$ go get github.com/gin-gonic/gin` 6 | 4. Navigate to examples folder: `$ cd $GOPATH/src/github.com/gin-gonic/gin/examples/` 7 | 5. Run it: `$ goapp serve app-engine/` -------------------------------------------------------------------------------- /vendor/github.com/googollee/go-engine.io/polling/try_locker.go: -------------------------------------------------------------------------------- 1 | package polling 2 | 3 | type Locker struct { 4 | locker chan struct{} 5 | } 6 | 7 | func NewLocker() *Locker { 8 | return &Locker{ 9 | locker: make(chan struct{}, 1), 10 | } 11 | } 12 | 13 | func (l *Locker) Lock() { 14 | l.locker <- struct{}{} 15 | } 16 | 17 | func (l *Locker) TryLock() bool { 18 | select { 19 | case l.locker <- struct{}{}: 20 | return true 21 | default: 22 | return false 23 | } 24 | } 25 | 26 | func (l *Locker) Unlock() { 27 | <-l.locker 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/moul/shikaku/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.2 5 | - 1.3 6 | - 1.4 7 | - 1.5 8 | - tip 9 | 10 | matrix: 11 | allow_failures: 12 | - go: tip 13 | 14 | before_install: 15 | - go get -u github.com/axw/gocov/gocov 16 | - go get -u github.com/mattn/goveralls 17 | - go get golang.org/x/tools/cmd/cover 18 | 19 | script: 20 | - make build 21 | - make test 22 | - go run ./cmd/shikakugen/main.go --help || true 23 | - make cover 24 | - goveralls -service=travis-ci -v -covermode=count -coverprofile=profile.out 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/nettest/stack_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build nacl plan9 6 | 7 | package nettest 8 | 9 | import ( 10 | "fmt" 11 | "runtime" 12 | ) 13 | 14 | // SupportsRawIPSocket reports whether the platform supports raw IP 15 | // sockets. 16 | func SupportsRawIPSocket() (string, bool) { 17 | return fmt.Sprintf("not supported on %s", runtime.GOOS), false 18 | } 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/sockopt_asmreqn_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !darwin,!freebsd,!linux,!windows 6 | 7 | package ipv4 8 | 9 | import "net" 10 | 11 | func getsockoptIPMreqn(fd, name int) (*net.Interface, error) { 12 | return nil, errOpNoSupport 13 | } 14 | 15 | func setsockoptIPMreqn(fd, name int, ifi *net.Interface, grp net.IP) error { 16 | return errOpNoSupport 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv6/helper_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build nacl plan9 solaris 6 | 7 | package ipv6 8 | 9 | func (c *genericOpt) sysfd() (int, error) { 10 | return 0, errOpNoSupport 11 | } 12 | 13 | func (c *dgramOpt) sysfd() (int, error) { 14 | return 0, errOpNoSupport 15 | } 16 | 17 | func (c *payloadHandler) sysfd() (int, error) { 18 | return 0, errOpNoSupport 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/altsrc/helpers_test.go: -------------------------------------------------------------------------------- 1 | package altsrc 2 | 3 | import ( 4 | "reflect" 5 | "testing" 6 | ) 7 | 8 | func expect(t *testing.T, a interface{}, b interface{}) { 9 | if !reflect.DeepEqual(b, a) { 10 | t.Errorf("Expected %#v (type %v) - Got %#v (type %v)", b, reflect.TypeOf(b), a, reflect.TypeOf(a)) 11 | } 12 | } 13 | 14 | func refute(t *testing.T, a interface{}, b interface{}) { 15 | if a == b { 16 | t.Errorf("Did not expect %v (type %v) - Got %v (type %v)", b, reflect.TypeOf(b), a, reflect.TypeOf(a)) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/sockopt_ssmreq_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !darwin,!freebsd,!linux 6 | 7 | package ipv4 8 | 9 | import "net" 10 | 11 | func setsockoptGroupReq(fd, name int, ifi *net.Interface, grp net.IP) error { 12 | return errOpNoSupport 13 | } 14 | 15 | func setsockoptGroupSourceReq(fd, name int, ifi *net.Interface, grp, src net.IP) error { 16 | return errOpNoSupport 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/render/data.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package render 6 | 7 | import "net/http" 8 | 9 | type Data struct { 10 | ContentType string 11 | Data []byte 12 | } 13 | 14 | func (r Data) Render(w http.ResponseWriter) error { 15 | if len(r.ContentType) > 0 { 16 | w.Header()["Content-Type"] = []string{r.ContentType} 17 | } 18 | w.Write(r.Data) 19 | return nil 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/nettest/rlimit_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package nettest 8 | 9 | import "syscall" 10 | 11 | func maxOpenFiles() int { 12 | var rlim syscall.Rlimit 13 | if err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rlim); err != nil { 14 | return defaultMaxOpenFiles 15 | } 16 | return int(rlim.Cur) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/examples/echo/README.md: -------------------------------------------------------------------------------- 1 | # Client and server example 2 | 3 | This example shows a simple client and server. 4 | 5 | The server echoes messages sent to it. The client sends a message every second 6 | and prints all messages received. 7 | 8 | To run the example, start the server: 9 | 10 | $ go run server.go 11 | 12 | Next, start the client: 13 | 14 | $ go run client.go 15 | 16 | The server includes a simple web client. To use the client, open 17 | http://127.0.0.1:8080 in the browser and follow the instructions on the page. 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/html/testdata/webkit/adoption02.dat: -------------------------------------------------------------------------------- 1 | #data 2 | 12

34 3 | #errors 4 | #document 5 | | 6 | | 7 | | 8 | | 9 | | "1" 10 | | 11 | | "2" 12 | | 13 | |

14 | | 15 | | "3" 16 | | "4" 17 | 18 | #data 19 |

20 | #errors 21 | #document 22 | | 23 | | 24 | | 25 | | 26 | |
27 | | 28 | |