mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
enable prealloc
Find slice declarations that could potentially be pre-allocated. Signed-off-by: Kai Xia <kaix+github@fastmail.com>
This commit is contained in:
@@ -153,7 +153,7 @@ func formatComponent(component string) string {
|
||||
}
|
||||
|
||||
func formatFields(fields map[string]any) string {
|
||||
var parts []string
|
||||
parts := make([]string, 0, len(fields))
|
||||
for k, v := range fields {
|
||||
parts = append(parts, fmt.Sprintf("%s=%v", k, v))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user