Refactor command argument building and parsing

This commit is contained in:
2025-09-19 19:59:46 +02:00
parent ec5485bd0e
commit 34a949d22e
7 changed files with 223 additions and 407 deletions

View File

@@ -106,10 +106,8 @@ func (o *MlxServerOptions) UnmarshalJSON(data []byte) error {
return nil
}
// BuildCommandArgs converts to command line arguments using the common builder
// BuildCommandArgs converts to command line arguments
func (o *MlxServerOptions) BuildCommandArgs() []string {
config := backends.ArgsBuilderConfig{
SliceHandling: backends.SliceAsMultipleFlags, // MLX doesn't currently have []string fields, but default to multiple flags
}
return backends.BuildCommandArgs(o, config)
multipleFlags := map[string]bool{} // MLX doesn't currently have []string fields
return backends.BuildCommandArgs(o, multipleFlags)
}