mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-18 01:44:38 +08:00
refactor: standardize code comments
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
package mcp
|
||||
|
||||
// Logger 日志接口(抽象依赖)
|
||||
// 使用 Printf 风格的方法名,方便集成 logrus、zap 等主流日志库
|
||||
// 默认使用全局 logger 包(见 mcp/config.go)
|
||||
// Logger interface (abstract dependency)
|
||||
// Uses Printf-style method names for easy integration with mainstream logging libraries like logrus, zap, etc.
|
||||
// Default uses global logger package (see mcp/config.go)
|
||||
type Logger interface {
|
||||
Debugf(format string, args ...any)
|
||||
Infof(format string, args ...any)
|
||||
@@ -10,7 +10,7 @@ type Logger interface {
|
||||
Errorf(format string, args ...any)
|
||||
}
|
||||
|
||||
// noopLogger 空日志实现(测试时使用)
|
||||
// noopLogger no-op logger implementation (used in tests)
|
||||
type noopLogger struct{}
|
||||
|
||||
func (l *noopLogger) Debugf(format string, args ...any) {}
|
||||
@@ -18,7 +18,7 @@ func (l *noopLogger) Infof(format string, args ...any) {}
|
||||
func (l *noopLogger) Warnf(format string, args ...any) {}
|
||||
func (l *noopLogger) Errorf(format string, args ...any) {}
|
||||
|
||||
// NewNoopLogger 创建空日志器(测试使用)
|
||||
// NewNoopLogger creates no-op logger (for testing)
|
||||
func NewNoopLogger() Logger {
|
||||
return &noopLogger{}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user