mirror of
https://github.com/derfenix/photocatalog.git
synced 2026-03-11 20:46:24 +03:00
Refactoring
This commit is contained in:
@@ -14,7 +14,7 @@ const (
|
||||
ModeMove Mode = "move"
|
||||
)
|
||||
|
||||
var supportedModes = []Mode{ModeHardlink, ModeSymlink, ModeMove, ModeCopy}
|
||||
var SupportedModes = []Mode{ModeHardlink, ModeSymlink, ModeMove, ModeCopy}
|
||||
|
||||
type Config struct {
|
||||
SourceDir string
|
||||
@@ -36,8 +36,8 @@ func (c *Config) Validate() error {
|
||||
return fmt.Errorf("target dir is required")
|
||||
}
|
||||
|
||||
if !slices.Contains(supportedModes, c.Mode) {
|
||||
return fmt.Errorf("invalid mode %s, supported modes: %s", c.Mode, supportedModes)
|
||||
if !slices.Contains(SupportedModes, c.Mode) {
|
||||
return fmt.Errorf("invalid mode %s, supported modes: %s", c.Mode, SupportedModes)
|
||||
}
|
||||
|
||||
if c.SkipFullSync && !c.Watch {
|
||||
|
||||
Reference in New Issue
Block a user