// GetData function returns user/users data
GetData function returns user/users data
// GetData function returns user / users data
func GetData(userID []int) ([]models.User, error) {
	var data []models.User
	for _, id := range userID {
		for _, user := range users {
			if user.ID == id {
				data = append(data, user)
			}
		}
	}
	if len(data) == 0 {
		log.Info().Msg("no data found for the specified id")
		return nil, errors.New("no data found for the specified id")
	}
	return data, nil
}
func GetData ( userID [ ] int ) ( [ ] models . User , error ) { var data [ ] models . User for _ , id := range userID { for _ , user := range users { if user . ID == id { data = append ( data , user ) } } } if len ( data ) == 0 { log . Info ( ) . Msg ( " " ) return nil , errors . New ( " " ) } return data , nil }
GetData function returns user/users data
GetData function returns user / users data
// variblae of type []models.User is created // user data is picked according to the id and assigned to data variable // error check if no data with the id is available // user data is returned