mirror of
https://github.com/Belphemur/CBZOptimizer.git
synced 2025-10-14 12:38:50 +02:00
perf: use viper as source for format
This commit is contained in:
@@ -29,3 +29,14 @@ func ListAll() []string {
|
||||
}
|
||||
return formats
|
||||
}
|
||||
|
||||
func FindConversionFormat(format string) ConversionFormat {
|
||||
for convFormat, names := range CommandValue {
|
||||
for _, name := range names {
|
||||
if name == format {
|
||||
return convFormat
|
||||
}
|
||||
}
|
||||
}
|
||||
return DefaultConversion
|
||||
}
|
||||
|
Reference in New Issue
Block a user