PrintTimestampedMessage 打印带时间戳的消息
(format string, args ...interface{})
| 32 | |
| 33 | // PrintTimestampedMessage 打印带时间戳的消息 |
| 34 | func PrintTimestampedMessage(format string, args ...interface{}) { |
| 35 | timestamp := time.Now().Format("15:04:05") |
| 36 | message := fmt.Sprintf(format, args...) |
| 37 | fmt.Printf("[%s] %s\n", timestamp, message) |
| 38 | } |
| 39 | |
| 40 | // PrintError 打印错误信息(带空行间距) |
| 41 | func PrintError(message string) { |
no outgoing calls
no test coverage detected