From 95c2c22d89fa2ebcffec041062b98a2a6fea456b Mon Sep 17 00:00:00 2001 From: Sinuhe Tellez Date: Sat, 13 Jan 2018 22:19:54 -0500 Subject: [PATCH] just format and clean little stuff --- main.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/main.go b/main.go index a1f60a2..cae1815 100644 --- a/main.go +++ b/main.go @@ -21,18 +21,16 @@ import ( "bytes" "encoding/xml" "flag" - - "golang.org/x/tools/blog/atom" - "io/ioutil" "log" "mime" "net/http" "net/url" "os" - "path/filepath" "time" + + "golang.org/x/tools/blog/atom" ) var ( @@ -67,7 +65,7 @@ func handler(w http.ResponseWriter, req *http.Request) error { } if fi.IsDir() { - content, err := getContent(w, req, fpath) + content, err := getContent(req, fpath) if err != nil { return err } @@ -92,7 +90,7 @@ func main() { log.Fatal(http.ListenAndServe(":"+port, nil)) } -func getContent(w http.ResponseWriter, req *http.Request, dirpath string) (result []byte, err error) { +func getContent(req *http.Request, dirpath string) (result []byte, err error) { feed := makeFeed(dirpath, req) if isAcquisition(dirpath) { acFeed := &AcquisitionFeed{&feed, "http://purl.org/dc/terms/", "http://opds-spec.org/2010/catalog"}