diff options
| author | Fuwn <[email protected]> | 2026-02-28 04:52:17 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-02-28 04:52:17 -0800 |
| commit | bb02fa43e5776e3d7b95cb47f0594eb4bd7f907f (patch) | |
| tree | 9d2e2f49c2e0cb9e153ca266d10b9b610e38c771 /internal/config/config.go | |
| parent | build(task): add multi-arch docker build targets (diff) | |
| download | plutia-test-bb02fa43e5776e3d7b95cb47f0594eb4bd7f907f.tar.xz plutia-test-bb02fa43e5776e3d7b95cb47f0594eb4bd7f907f.zip | |
docs: refine user-facing wording for clarity and consistency
Diffstat (limited to 'internal/config/config.go')
| -rw-r--r-- | internal/config/config.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index e94b5ea..69173fd 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -176,21 +176,21 @@ func applyEnv(cfg *Config) { func (c Config) Validate() error { if c.Mode != ModeResolver && c.Mode != ModeMirror && c.Mode != ModeThin { - return fmt.Errorf("invalid mode %q", c.Mode) + return fmt.Errorf("mode must be one of mirror, resolver, or thin (got %q)", c.Mode) } switch c.VerifyPolicy { case VerifyFull, VerifyLazy, VerifyStateOnly: default: - return fmt.Errorf("invalid verify policy %q", c.VerifyPolicy) + return fmt.Errorf("verify must be one of full, lazy, or state-only (got %q)", c.VerifyPolicy) } if c.DataDir == "" { - return errors.New("data_dir is required") + return errors.New("set data_dir in the config file") } if c.PLCSource == "" { - return errors.New("plc_source is required") + return errors.New("set plc_source in the config file") } if c.ZstdLevel < 1 || c.ZstdLevel > 22 { @@ -226,7 +226,7 @@ func (c Config) Validate() error { } if c.ListenAddr == "" { - return errors.New("listen_addr is required") + return errors.New("set listen_addr in the config file") } if c.PollInterval <= 0 { |