Remove -c shorthand for --index, update PGO profile

This commit is contained in:
Seednode 2023-09-29 08:31:35 -05:00
parent 09ccf91a39
commit 71497198fa
4 changed files with 8 additions and 8 deletions

View File

@ -398,7 +398,7 @@ Poll:
}
if Verbose {
fmt.Printf("%s | INDEX: Selected %d/%d files across %d/%d directories in %s\n",
fmt.Printf("%s | INDEX: Selecting from %d/%d files across %d/%d directories in %s\n",
time.Now().Format(logDate),
stats.filesMatched,
stats.filesMatched+stats.filesSkipped,

View File

@ -12,7 +12,7 @@ import (
)
const (
ReleaseVersion string = "2.0.1"
ReleaseVersion string = "2.0.2"
)
var (
@ -95,7 +95,7 @@ func init() {
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(&Images, "images", false, "enable support for image files")
rootCmd.Flags().BoolVarP(&Index, "index", "c", false, "generate index of supported file paths at startup")
rootCmd.Flags().BoolVar(&Index, "index", false, "generate index of supported file paths at startup")
rootCmd.Flags().StringVar(&IndexFile, "index-file", "", "path to optional persistent index file")
rootCmd.Flags().BoolVarP(&Info, "info", "i", false, "expose informational endpoints")
rootCmd.Flags().IntVar(&MaxDirScans, "max-directory-scans", 32, "number of directories to scan at once")

View File

@ -503,6 +503,11 @@ func ServePage(args []string) error {
if err != nil {
return err
}
err = importIndex(paths, index, formats)
if err != nil {
return err
}
}
if Info {
@ -517,11 +522,6 @@ func ServePage(args []string) error {
fmt.Printf("WARNING! Files *will* be deleted after serving!\n\n")
}
err = importIndex(paths, index, formats)
if err != nil {
return err
}
go func() {
for err := range errorChannel {
fmt.Printf("%s | ERROR: %v\n", time.Now().Format(logDate), err)

Binary file not shown.