mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-13 15:30:24 +08:00
简化IP名单中创建IP操作/支持IP以CIDR方式显示
This commit is contained in:
@@ -1 +1,15 @@
|
||||
package models
|
||||
|
||||
// ComposeValue 组合原始值
|
||||
func (this *IPItem) ComposeValue() string {
|
||||
if len(this.Value) > 0 {
|
||||
return this.Value
|
||||
}
|
||||
|
||||
// 兼容以往版本
|
||||
if len(this.IpTo) > 0 {
|
||||
return this.IpFrom + "-" + this.IpTo
|
||||
}
|
||||
|
||||
return this.IpFrom
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user