(format string, args ...any)
| 268 | } |
| 269 | |
| 270 | func formatMessage(format string, args ...any) string { |
| 271 | if len(args) == 0 { |
| 272 | return format |
| 273 | } |
| 274 | if strings.Contains(format, "%") { |
| 275 | return fmt.Sprintf(format, args...) |
| 276 | } |
| 277 | items := make([]any, 0, len(args)+1) |
| 278 | items = append(items, format) |
| 279 | items = append(items, args...) |
| 280 | return fmt.Sprint(items...) |
| 281 | } |
no outgoing calls