You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
343 B

6 years ago
6 years ago
6 years ago
6 years ago
  1. package main
  2. import (
  3. "fmt"
  4. "github.com/fatih/color"
  5. )
  6. func getRecommendations(userid string, nrec int) []ItemModel {
  7. user, err := getUserById(userid)
  8. check(err)
  9. items, err := getItemsNotActed(user.Actions)
  10. check(err)
  11. //select nrec items from the items array
  12. color.Blue("recommended items: ")
  13. fmt.Println(items)
  14. return items
  15. }