2
0
mirror of https://github.com/acepanel/helper.git synced 2026-02-04 01:47:16 +08:00

fix: lint

This commit is contained in:
2026-01-26 16:58:45 +08:00
parent e51693b2cc
commit db3c3944e0

View File

@@ -34,12 +34,12 @@ func (c *Config) InitLogFile() error {
// CloseLogFile 关闭日志文件
func (c *Config) CloseLogFile() {
if c.logWriter != nil {
c.logWriter.Close()
_ = c.logWriter.Close()
}
}
// WriteLog 写日志
func (c *Config) WriteLog(format string, args ...interface{}) {
func (c *Config) WriteLog(format string, args ...any) {
if c.logWriter == nil {
return
}
@@ -47,5 +47,5 @@ func (c *Config) WriteLog(format string, args ...interface{}) {
defer c.logMu.Unlock()
timestamp := time.Now().Format("2006-01-02 15:04:05")
msg := fmt.Sprintf(format, args...)
fmt.Fprintf(c.logWriter, "[%s] %s\n", timestamp, msg)
_, _ = fmt.Fprintf(c.logWriter, "[%s] %s\n", timestamp, msg)
}