mirror of
https://github.com/speatzle/nfsense.git
synced 2025-05-10 18:38:22 +00:00
Remove TCPUDP Service, Add Service Group
This commit is contained in:
parent
2afe7341c1
commit
db54f8aa8c
1 changed files with 6 additions and 6 deletions
|
@ -39,20 +39,20 @@ type ServiceType int
|
|||
const (
|
||||
TCP ServiceType = iota
|
||||
UDP
|
||||
TCPUDP
|
||||
ICMP
|
||||
ServiceGroup
|
||||
)
|
||||
|
||||
func (t ServiceType) String() string {
|
||||
return [...]string{"tcp", "udp", "tcpudp", "icmp"}[t]
|
||||
return [...]string{"tcp", "udp", "icmp", "group"}[t]
|
||||
}
|
||||
|
||||
func (t *ServiceType) FromString(input string) ServiceType {
|
||||
return map[string]ServiceType{
|
||||
"tcp": TCP,
|
||||
"udp": UDP,
|
||||
"tcpudp": TCPUDP,
|
||||
"icmp": ICMP,
|
||||
"tcp": TCP,
|
||||
"udp": UDP,
|
||||
"icmp": ICMP,
|
||||
"group": ServiceGroup,
|
||||
}[input]
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue