fix(lint): 调整 Target 结构体字段顺序优化内存对齐

This commit is contained in:
xfy 2026-04-13 16:41:20 +08:00
parent 6b5494fde9
commit 0c8a15cfee

View File

@ -40,14 +40,14 @@ import (
// //
// 所有字段都设计为使用原子操作进行并发访问(如适用)。 // 所有字段都设计为使用原子操作进行并发访问(如适用)。
type Target struct { type Target struct {
resolvedIPs atomic.Pointer[[]string]
URL string URL string
hostname string hostname string
hostnameOnce sync.Once
VirtualHashes []uint64 VirtualHashes []uint64
resolvedIPs atomic.Pointer[[]string]
Weight int Weight int
Connections int64 Connections int64
lastResolved atomic.Int64 lastResolved atomic.Int64
hostnameOnce sync.Once
Healthy atomic.Bool Healthy atomic.Bool
} }