mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-11 20:36:12 +02:00
print missing "AS" values as empty strings instead of "0 " (#1867)
This commit is contained in:
parent
b0889d7751
commit
3beb84bcfe
6 changed files with 17 additions and 6 deletions
|
@ -63,3 +63,14 @@ func (s Source) GetScope() string {
|
|||
}
|
||||
return *s.Scope
|
||||
}
|
||||
|
||||
func (s Source) GetAsNumberName() string {
|
||||
ret := ""
|
||||
if s.AsNumber != "0" {
|
||||
ret += s.AsNumber
|
||||
}
|
||||
if s.AsName != "" {
|
||||
ret += " " + s.AsName
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue