mirror of
https://github.com/Belphemur/CBZOptimizer.git
synced 2025-12-05 00:12:37 +01: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