diff --git a/cmd/root.go b/cmd/root.go index a17b584..083f80d 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -12,7 +12,6 @@ import ( var Port int var Recursive bool -var Verbose bool var rootCmd = &cobra.Command{ Use: "roulette [path2] ... [pathN]", @@ -35,6 +34,5 @@ func Execute() { func init() { rootCmd.Flags().IntVarP(&Port, "port", "p", 8080, "port to listen on") rootCmd.Flags().BoolVarP(&Recursive, "recursive", "r", false, "recurse into subdirectories") - rootCmd.Flags().BoolVarP(&Verbose, "verbose", "v", false, "also write output to stdout") rootCmd.Flags().SetInterspersed(false) } diff --git a/cmd/version.go b/cmd/version.go index 8fc183c..c5eb350 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -10,7 +10,7 @@ import ( "github.com/spf13/cobra" ) -var Version = "0.1.0" +var Version = "0.1.1" func init() { rootCmd.AddCommand(versionCmd) diff --git a/cmd/web.go b/cmd/web.go index a7b306f..f068a52 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -60,20 +60,6 @@ func statusNotFound(w http.ResponseWriter, filePath string) error { return nil } -func statusForbidden(w http.ResponseWriter, filePath string) error { - fmt.Println("Client requested forbidden file " + filePath + ".") - - w.WriteHeader(http.StatusForbidden) - w.Header().Set("Content-Type", "txt/plain") - htmlBody := "Access denied." - _, err := io.WriteString(w, htmlBody) - if err != nil { - return err - } - - return nil -} - func serveStaticFile(w http.ResponseWriter, request string, paths []string) error { filePath, err := url.QueryUnescape(request) if err != nil {