mirror of
https://github.com/lordmathis/llamactl.git
synced 2025-11-05 16:44:22 +00:00
Fix JSON marshaling of backend options by using a pointer
This commit is contained in:
@@ -163,7 +163,8 @@ func (c *Options) MarshalJSON() ([]byte, error) {
|
|||||||
aux.BackendType = c.BackendOptions.BackendType
|
aux.BackendType = c.BackendOptions.BackendType
|
||||||
|
|
||||||
// Marshal the backends.Options struct to get the properly formatted backend options
|
// Marshal the backends.Options struct to get the properly formatted backend options
|
||||||
backendData, err := json.Marshal(c.BackendOptions)
|
// Marshal a pointer to trigger the pointer receiver MarshalJSON method
|
||||||
|
backendData, err := json.Marshal(&c.BackendOptions)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("failed to marshal backend options: %w", err)
|
return nil, fmt.Errorf("failed to marshal backend options: %w", err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user