Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/data/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func NewDownloader() *Downloader {
}

// printTimestampedMessage 打印带时间戳的消息
func printTimestampedMessage(format string, args ...interface{}) {
func printTimestampedMessage(format string, args ...any) {
timestamp := time.Now().Format("15:04:05")
message := fmt.Sprintf(format, args...)
fmt.Printf("[%s] %s\n", timestamp, message)
Expand Down
10 changes: 5 additions & 5 deletions internal/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ type PipelineContext struct {
Domain string
StartTime time.Time
Result *DetectionResult
Connections interface{} // 使用interface{}来支持不同的连接管理器类型
Cache interface{} // 使用interface{}来支持不同的缓存管理器类型
Connections any // 使用interface{}来支持不同的连接管理器类型
Cache any // 使用interface{}来支持不同的缓存管理器类型
Config *Config
EarlyExit bool
Error error
Expand All @@ -275,14 +275,14 @@ type CacheManager struct {

// HTTPClient HTTP客户端
type HTTPClient struct {
Client interface{} // *http.Client
Transport interface{} // *http.Transport
Client any // *http.Client
Transport any // *http.Transport
}

// TLSClient TLS客户端
type TLSClient struct {
Config *TLSConfig
Conn interface{} // *tls.Conn
Conn any // *tls.Conn
}

// DNSResolver DNS解析器
Expand Down
2 changes: 1 addition & 1 deletion internal/ui/display.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func PrintUsage() {
}

// PrintTimestampedMessage 打印带时间戳的消息
func PrintTimestampedMessage(format string, args ...interface{}) {
func PrintTimestampedMessage(format string, args ...any) {
timestamp := time.Now().Format("15:04:05")
message := fmt.Sprintf(format, args...)
fmt.Printf("[%s] %s\n", timestamp, message)
Expand Down