Remove debug argument
This commit is contained in:
parent
bc268db233
commit
0b62009fa3
|
@ -121,7 +121,7 @@ Flags:
|
||||||
-i, --info expose informational endpoints
|
-i, --info expose informational endpoints
|
||||||
--maximum-files uint32 skip directories with file counts above this value (default 4294967295)
|
--maximum-files uint32 skip directories with file counts above this value (default 4294967295)
|
||||||
--minimum-files uint32 skip directories with file counts below this value (default 1)
|
--minimum-files uint32 skip directories with file counts below this value (default 1)
|
||||||
--page-length uint32 pagination length for statistics and debug pages
|
--page-length uint32 pagination length for info pages
|
||||||
-p, --port uint16 port to listen on (default 8080)
|
-p, --port uint16 port to listen on (default 8080)
|
||||||
--prefix string root path for http handlers (for reverse proxying) (default "/")
|
--prefix string root path for http handlers (for reverse proxying) (default "/")
|
||||||
--profile register net/http/pprof handlers
|
--profile register net/http/pprof handlers
|
||||||
|
|
|
@ -11,7 +11,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
ReleaseVersion string = "0.84.3"
|
ReleaseVersion string = "0.84.4"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -21,7 +21,6 @@ var (
|
||||||
Cache bool
|
Cache bool
|
||||||
CacheFile string
|
CacheFile string
|
||||||
Code bool
|
Code bool
|
||||||
Debug bool
|
|
||||||
Filtering bool
|
Filtering bool
|
||||||
Flash bool
|
Flash bool
|
||||||
Handlers bool
|
Handlers bool
|
||||||
|
@ -71,7 +70,6 @@ func init() {
|
||||||
rootCmd.Flags().BoolVarP(&Cache, "cache", "c", false, "generate directory cache at startup")
|
rootCmd.Flags().BoolVarP(&Cache, "cache", "c", false, "generate directory cache at startup")
|
||||||
rootCmd.Flags().StringVar(&CacheFile, "cache-file", "", "path to optional persistent cache file")
|
rootCmd.Flags().StringVar(&CacheFile, "cache-file", "", "path to optional persistent cache file")
|
||||||
rootCmd.Flags().BoolVar(&Code, "code", false, "enable support for source code files")
|
rootCmd.Flags().BoolVar(&Code, "code", false, "enable support for source code files")
|
||||||
rootCmd.Flags().BoolVar(&Debug, "debug", false, "display debug information")
|
|
||||||
rootCmd.Flags().BoolVarP(&Filtering, "filter", "f", false, "enable filtering")
|
rootCmd.Flags().BoolVarP(&Filtering, "filter", "f", false, "enable filtering")
|
||||||
rootCmd.Flags().BoolVar(&Flash, "flash", false, "enable support for shockwave flash files (via ruffle.rs)")
|
rootCmd.Flags().BoolVar(&Flash, "flash", false, "enable support for shockwave flash files (via ruffle.rs)")
|
||||||
rootCmd.Flags().BoolVar(&Handlers, "handlers", false, "display registered handlers (for debugging)")
|
rootCmd.Flags().BoolVar(&Handlers, "handlers", false, "display registered handlers (for debugging)")
|
||||||
|
@ -79,7 +77,7 @@ func init() {
|
||||||
rootCmd.Flags().BoolVarP(&Info, "info", "i", false, "expose informational endpoints")
|
rootCmd.Flags().BoolVarP(&Info, "info", "i", false, "expose informational endpoints")
|
||||||
rootCmd.Flags().Uint32Var(&MaximumFileCount, "maximum-files", 1<<32-1, "skip directories with file counts above this value")
|
rootCmd.Flags().Uint32Var(&MaximumFileCount, "maximum-files", 1<<32-1, "skip directories with file counts above this value")
|
||||||
rootCmd.Flags().Uint32Var(&MinimumFileCount, "minimum-files", 1, "skip directories with file counts below this value")
|
rootCmd.Flags().Uint32Var(&MinimumFileCount, "minimum-files", 1, "skip directories with file counts below this value")
|
||||||
rootCmd.Flags().Uint32Var(&PageLength, "page-length", 0, "pagination length for statistics and debug pages")
|
rootCmd.Flags().Uint32Var(&PageLength, "page-length", 0, "pagination length for info pages")
|
||||||
rootCmd.Flags().Uint16VarP(&Port, "port", "p", 8080, "port to listen on")
|
rootCmd.Flags().Uint16VarP(&Port, "port", "p", 8080, "port to listen on")
|
||||||
rootCmd.Flags().StringVar(&Prefix, "prefix", "/", "root path for http handlers (for reverse proxying)")
|
rootCmd.Flags().StringVar(&Prefix, "prefix", "/", "root path for http handlers (for reverse proxying)")
|
||||||
rootCmd.Flags().BoolVar(&Profile, "profile", false, "register net/http/pprof handlers")
|
rootCmd.Flags().BoolVar(&Profile, "profile", false, "register net/http/pprof handlers")
|
||||||
|
|
16
cmd/web.go
16
cmd/web.go
|
@ -49,9 +49,6 @@ func serveStaticFile(paths []string, cache *fileCache) httprouter.Handle {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
|
|
||||||
if Debug {
|
|
||||||
fmt.Printf("Call to stripQueryParams(%v) failed inside serveStaticFile()\n", path)
|
|
||||||
}
|
|
||||||
serverError(w, r, nil)
|
serverError(w, r, nil)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
@ -61,9 +58,6 @@ func serveStaticFile(paths []string, cache *fileCache) httprouter.Handle {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
|
|
||||||
if Debug {
|
|
||||||
fmt.Printf("Call to filepath.EvalSymlinks(%v) failed inside serveStaticFile()\n", strings.TrimPrefix(prefixedFilePath, prefix))
|
|
||||||
}
|
|
||||||
serverError(w, r, nil)
|
serverError(w, r, nil)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
@ -77,9 +71,6 @@ func serveStaticFile(paths []string, cache *fileCache) httprouter.Handle {
|
||||||
|
|
||||||
exists, err := fileExists(filePath)
|
exists, err := fileExists(filePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if Debug {
|
|
||||||
fmt.Printf("Call to fileExists(%v) failed inside serveStaticFile()\n", filePath)
|
|
||||||
}
|
|
||||||
serverError(w, r, nil)
|
serverError(w, r, nil)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
@ -95,9 +86,6 @@ func serveStaticFile(paths []string, cache *fileCache) httprouter.Handle {
|
||||||
|
|
||||||
buf, err := os.ReadFile(filePath)
|
buf, err := os.ReadFile(filePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if Debug {
|
|
||||||
fmt.Printf("Call to os.ReadFile(%v) failed inside serveStaticFile()\n", filePath)
|
|
||||||
}
|
|
||||||
serverError(w, r, nil)
|
serverError(w, r, nil)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
@ -110,10 +98,6 @@ func serveStaticFile(paths []string, cache *fileCache) httprouter.Handle {
|
||||||
if Russian {
|
if Russian {
|
||||||
err = os.Remove(filePath)
|
err = os.Remove(filePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if Debug {
|
|
||||||
fmt.Printf("Call to os.Remove(%v) failed inside serveStaticFile()\n", filePath)
|
|
||||||
}
|
|
||||||
|
|
||||||
serverError(w, r, nil)
|
serverError(w, r, nil)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue