Add workaround for bulkBarrierPreWrite: unaligned arguments panic

This commit is contained in:
世界
2024-12-10 13:04:55 +08:00
parent 1e6a3f1f0b
commit cec7e47086
5 changed files with 28 additions and 22 deletions

View File

@@ -139,17 +139,17 @@ func (s *platformInterfaceStub) SendNotification(notification *platform.Notifica
return nil
}
func FormatConfig(configContent string) (string, error) {
func FormatConfig(configContent string) (*StringBox, error) {
options, err := parseConfig(configContent)
if err != nil {
return "", err
return nil, err
}
var buffer bytes.Buffer
encoder := json.NewEncoder(&buffer)
encoder.SetIndent("", " ")
err = encoder.Encode(options)
if err != nil {
return "", err
return nil, err
}
return buffer.String(), nil
return wrapString(buffer.String()), nil
}