This file contains hidden or 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
| before_install: | |
| - go get -u gopkg.in/alecthomas/gometalinter.v2 | |
| - gometalinter.v2 --install |
This file contains hidden or 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
| matrix: | |
| allow_failures: | |
| go: master | |
| fast_finish: true |
This file contains hidden or 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
| language: go | |
| go: | |
| - 1.8 | |
| - 1.9 | |
| - 1.9.x | |
| - master |
This file contains hidden or 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
| install: | |
| - dep ensure |
This file contains hidden or 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
| notifications: | |
| email: false |
This file contains hidden or 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
| notifications: | |
| email: | |
| recipients: | |
| - [email protected] | |
| - [email protected] | |
| on_success: change | |
| on_failure: always |
This file contains hidden or 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
| before_install: | |
| - >- | |
| curl -L -s https://github.com/golang/dep/releases/download/v0.3.2/dep-linux-amd64 | |
| -o $GOPATH/bin/dep | |
| - chmod +x $GOPATH/bin/dep |
This file contains hidden or 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
| BUILD_OPTS=-p4 -race | |
| BIN_NAME=my_app | |
| default: test | |
| .PHONY: test | |
| test: compile | |
| @echo | |
| @echo "[running tests]" | |
| @go test -v ./... |
This file contains hidden or 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
| name := "console-project" | |
| version := "1.0" | |
| scalaVersion := "2.12.4" | |
| libraryDependencies ++= Seq( | |
| "com.typesafe.akka" %% "akka-actor" % "2.5.9" | |
| ) |
This file contains hidden or 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
| def networkRequestWithRetries(factor: Float = 1.5f, init: Int = 1, cur: Int = 0) | |
| (implicit as: ActorSystem): Future[String] = { | |
| networkRequest().recoverWith { | |
| case NetworkException => | |
| val next: Int = | |
| if (cur == 0) init | |
| else Math.ceil(cur * factor).toInt | |
| println(s"retrying after ${next} ms") | |
| after(next.milliseconds, as.scheduler, global, Future.successful(1)).flatMap { _ => | |
| networkRequestWithRetries(factor, init, next) |