worked out some bugs in exporting messages, not all in new code - mechanisms will be needed to cope with the bugs in the database
This commit is contained in:
+8
-2
@@ -20,6 +20,7 @@ import (
|
||||
"strconv"
|
||||
|
||||
argparse "github.com/alexflint/go-arg"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
@@ -31,8 +32,9 @@ const AMSTERDAM_COPYRIGHT = "2025-2026"
|
||||
|
||||
// AmCLI is the command-line interface arguments structure.
|
||||
type AmCLI struct {
|
||||
ConfigFile string `arg:"-C,--config" help:"Location of the configuration file."`
|
||||
DebugPanic bool `arg:"--debug-panic" help:"Development Only - disable Echo panic recovery"`
|
||||
ConfigFile string `arg:"-C,--config" help:"Location of the configuration file."`
|
||||
DebugPanic bool `arg:"--debug-panic" help:"Development Only - disable Echo panic recovery"`
|
||||
BuggyAttachments bool `arg:"--buggy-attachments" help:"Some attachments may be buggy - truncate data if necessary"`
|
||||
}
|
||||
|
||||
// CommandLine is the command-line arguments passed to Amsterdam.
|
||||
@@ -239,6 +241,10 @@ func parseDataSize(s string) (int32, error) {
|
||||
func SetupConfig() {
|
||||
argparse.MustParse(&CommandLine)
|
||||
|
||||
if CommandLine.BuggyAttachments {
|
||||
log.Warn("WARNING: --buggy-attachments flag set - NOT recommended for production usage")
|
||||
}
|
||||
|
||||
if CommandLine.ConfigFile != "" {
|
||||
// load the data and use it to unmarshal the loaded configuration
|
||||
data, err := os.ReadFile(CommandLine.ConfigFile)
|
||||
|
||||
Reference in New Issue
Block a user