How to check if empty name in Golang multi languages

Member

makayla.beahan

by makayla.beahan , in category: Golang , 2 months ago

How to check if empty name in Golang multi languages 😝

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
func (svc *UserSvc) isEmptyName(name model.User_Name) bool {
  if name.First.RU == "" {
    if name.First.EN == "" {
      if name.First.TR == "" {
        if name.First.IT == "" {
          if name.Last.RU == "" {
            if name.Last.EN == "" {
              if name.Last.TR == "" {
                if name.Last.IT == "" {
                  return true
                }
              }
            }
          }
        }
      }
    }
  }
  return false
}


Facebook Twitter LinkedIn Telegram Whatsapp Pocket

no answers