Fix typo (lz5 => lz4) in compression format list, change http server error output for consistency with other errors
This commit is contained in:
parent
1f6a06bc2c
commit
787d3880ec
|
@ -153,7 +153,7 @@ Flags:
|
|||
--case-sensitive use case-sensitive matching for filters
|
||||
--code enable support for source code files
|
||||
--code-theme string theme for source code syntax highlighting (default "solarized-dark256")
|
||||
--compression string compression format to use for index (flate, gzip, lz5, lzw, none, snappy, zlib, zstd) (default "zstd")
|
||||
--compression string compression format to use for index (flate, gzip, lz4, lzw, none, snappy, zlib, zstd) (default "zstd")
|
||||
--compression-fast use fastest compression level (default is best)
|
||||
--concurrency int maximum concurrency for scan threads (default 2147483647)
|
||||
-d, --debug display even more verbose logs
|
||||
|
|
10
cmd/root.go
10
cmd/root.go
|
@ -5,10 +5,12 @@ Copyright © 2023 Seednode <seednode@seedno.de>
|
|||
package cmd
|
||||
|
||||
import (
|
||||
"log"
|
||||
"fmt"
|
||||
"math"
|
||||
"os"
|
||||
"regexp"
|
||||
"slices"
|
||||
"time"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
@ -123,7 +125,9 @@ var (
|
|||
func Execute() {
|
||||
err := rootCmd.Execute()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
fmt.Printf("%s | ERROR: %v\n", time.Now().Format(logDate), err)
|
||||
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -137,7 +141,7 @@ func init() {
|
|||
rootCmd.Flags().BoolVar(&CaseSensitive, "case-sensitive", false, "use case-sensitive matching for filters")
|
||||
rootCmd.Flags().BoolVar(&Code, "code", false, "enable support for source code files")
|
||||
rootCmd.Flags().StringVar(&CodeTheme, "code-theme", "solarized-dark256", "theme for source code syntax highlighting")
|
||||
rootCmd.Flags().StringVar(&Compression, "compression", "zstd", "compression format to use for index (flate, gzip, lz5, lzw, none, snappy, zlib, zstd)")
|
||||
rootCmd.Flags().StringVar(&Compression, "compression", "zstd", "compression format to use for index (flate, gzip, lz4, lzw, none, snappy, zlib, zstd)")
|
||||
rootCmd.Flags().BoolVar(&CompressionFast, "compression-fast", false, "use fastest compression level (default is best)")
|
||||
rootCmd.Flags().IntVar(&Concurrency, "concurrency", math.MaxInt32, "maximum concurrency for scan threads")
|
||||
rootCmd.Flags().BoolVarP(&Debug, "debug", "d", false, "display even more verbose logs")
|
||||
|
|
Loading…
Reference in New Issue