Get rid of Iris and use julienschmidt/httprouter instead (#20)

* Replace iris with httprouter

* Linter fixes

* Finalize iris removal

* Vendor dependencies for reproducable builds

* Api tests are back
This commit is contained in:
Joona Hoikkala
2017-11-14 23:54:29 +02:00
committed by GitHub
parent 93871a7cec
commit fd9ce4606d
1541 changed files with 668170 additions and 259 deletions

View File

@ -2,6 +2,7 @@ package main
import (
"crypto/rand"
"fmt"
"math/big"
"os"
"regexp"
@ -12,6 +13,10 @@ import (
log "github.com/sirupsen/logrus"
)
func jsonError(message string) []byte {
return []byte(fmt.Sprintf("{\"error\": \"%s\"}", message))
}
func fileExists(fname string) bool {
_, err := os.Stat(fname)
if err != nil {