print missing "AS" values as empty strings instead of "0 " (#1867)

This commit is contained in:
mmetc 2022-11-14 09:55:53 +01:00 committed by GitHub
parent b0889d7751
commit 3beb84bcfe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 6 deletions

View file

@ -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
}