package main type VpnProvider interface { ServerList() (error, *[]string) } func (s *OpenVpnMgt) getServerList(provider string) error { var err error s.Lock() defer s.Unlock() if _, ok := s.VpnRemotes[provider]; ok { return nil } switch provider { case "expressvpn": list := ExpressVPN{} err, s.VpnRemotes[provider] = list.ServerList() return err } return nil }