Run go fmt
This commit is contained in:
parent
d924b577d1
commit
9f1204db35
7 changed files with 24 additions and 26 deletions
|
@ -1,10 +1,10 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"strconv"
|
|
||||||
"labix.org/v2/mgo"
|
"labix.org/v2/mgo"
|
||||||
"labix.org/v2/mgo/bson"
|
"labix.org/v2/mgo/bson"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -24,13 +24,11 @@ func bookHandler(coll *mgo.Collection) func(http.ResponseWriter, *http.Request)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func fileHandler(path string) {
|
func fileHandler(path string) {
|
||||||
h := http.FileServer(http.Dir(path[1:]))
|
h := http.FileServer(http.Dir(path[1:]))
|
||||||
http.Handle(path, http.StripPrefix(path, h))
|
http.Handle(path, http.StripPrefix(path, h))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
type indexData struct {
|
type indexData struct {
|
||||||
Books []Book
|
Books []Book
|
||||||
Count int
|
Count int
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"labix.org/v2/mgo"
|
||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
"labix.org/v2/mgo"
|
|
||||||
//"labix.org/v2/mgo/bson"
|
//"labix.org/v2/mgo/bson"
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
Reference in a new issue