mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-02-26 16:57:08 +00:00
chore: adjust the internal code structure of the dns module
This commit is contained in:
@@ -2,10 +2,10 @@ package context
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/metacubex/mihomo/common/utils"
|
||||
|
||||
"github.com/gofrs/uuid/v5"
|
||||
"github.com/miekg/dns"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -17,17 +17,15 @@ const (
|
||||
type DNSContext struct {
|
||||
context.Context
|
||||
|
||||
id uuid.UUID
|
||||
msg *dns.Msg
|
||||
tp string
|
||||
id uuid.UUID
|
||||
tp string
|
||||
}
|
||||
|
||||
func NewDNSContext(ctx context.Context, msg *dns.Msg) *DNSContext {
|
||||
func NewDNSContext(ctx context.Context) *DNSContext {
|
||||
return &DNSContext{
|
||||
Context: ctx,
|
||||
|
||||
id: utils.NewUUIDV4(),
|
||||
msg: msg,
|
||||
id: utils.NewUUIDV4(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user