common/person/name.go

18 lines
336 B
Go
Raw Normal View History

2025-01-12 10:04:51 +01:00
package person
func ConstructName(firstName, familyName, defaultValue string) string {
name := defaultValue
if familyName != defaultValue {
if firstName != defaultValue {
name = firstName + " " + familyName
} else {
name = familyName
}
} else {
if firstName != defaultValue {
name = firstName
}
}
return name
}