From 4fa22c837cb00b87cd43c0aceec26729b8c3fa48 Mon Sep 17 00:00:00 2001 From: SayaAndy Date: Wed, 16 Jul 2025 13:36:07 +0700 Subject: format: rename processor to converter --- config/config.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'config/config.go') diff --git a/config/config.go b/config/config.go index 66533a6..3ca8f84 100644 --- a/config/config.go +++ b/config/config.go @@ -11,7 +11,7 @@ import ( type Config struct { Input InputConfig `json:"Input" validate:"required"` - Processor ProcessorConfig `json:"Processor" validate:"required"` + Converter ConverterConfig `json:"Converter" validate:"required"` Output OutputConfig `json:"Output" validate:"required"` MaxConcurrentJobs int `json:"MaxConcurrentJobs" validate:"required,min=1"` ForceRewrite bool `json:"ForceRewrite" validate:"required"` @@ -72,12 +72,12 @@ type LocalConfig struct { Path string `json:"Path" validate:"required,min=1"` } -type ProcessorConfig struct { +type ConverterConfig struct { Type string `json:"Type" validate:"required,oneof=webp"` Config any `json:"Config" validate:"required"` } -func (pc *ProcessorConfig) UnmarshalJSON(data []byte) error { +func (pc *ConverterConfig) UnmarshalJSON(data []byte) error { var tmp struct { Type string `json:"Type"` Config json.RawMessage `json:"Config"` -- cgit v1.3.1+13