mirror of https://github.com/dirtbags/moth.git
go fmt
This commit is contained in:
parent
dc4fa96f9e
commit
628d8a0b05
|
@ -297,4 +297,3 @@ func (ctx *Instance) BindHandlers() {
|
|||
ctx.mux.HandleFunc(ctx.Base+"/puzzles.json", ctx.puzzlesHandler)
|
||||
ctx.mux.HandleFunc(ctx.Base+"/points.json", ctx.pointsHandler)
|
||||
}
|
||||
|
||||
|
|
|
@ -6,12 +6,12 @@ import (
|
|||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"math/rand"
|
||||
"net/http"
|
||||
"os"
|
||||
"path"
|
||||
"strings"
|
||||
"time"
|
||||
"math/rand"
|
||||
)
|
||||
|
||||
type Instance struct {
|
||||
|
@ -56,7 +56,7 @@ const distinguishableChars = "234678abcdefhijkmnpqrtwxyz="
|
|||
|
||||
func mktoken() string {
|
||||
a := make([]byte, 8)
|
||||
for i := range(a) {
|
||||
for i := range a {
|
||||
char := rand.Intn(len(distinguishableChars))
|
||||
a[i] = distinguishableChars[char]
|
||||
}
|
||||
|
|
|
@ -3,19 +3,17 @@ package main
|
|||
import (
|
||||
"github.com/namsral/flag"
|
||||
"log"
|
||||
"math/rand"
|
||||
"mime"
|
||||
"net/http"
|
||||
"time"
|
||||
"math/rand"
|
||||
)
|
||||
|
||||
|
||||
func setup() error {
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
func main() {
|
||||
base := flag.String(
|
||||
"base",
|
||||
|
|
Loading…
Reference in New Issue