mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-03-04 21:07:30 +00:00
chore: rewrite IntRanges constructor
This commit is contained in:
@@ -39,7 +39,7 @@ func (p *Port) Payload() string {
|
||||
}
|
||||
|
||||
func NewPort(port string, adapter string, ruleType C.RuleType) (*Port, error) {
|
||||
portRanges, err := utils.NewIntRanges[uint16](port)
|
||||
portRanges, err := utils.NewUnsignedRanges[uint16](port)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("%w, %w", errPayload, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user