Exemple #1
0
func list() {
	users := s.GetUserNames()
	for _, user := range users {
		n, _ := bux.Get(user)
		fmt.Printf("%20s %v\n", user, n)
	}
}
Exemple #2
0
// Return the total of all user SkilBux in the system (minus admin account)
func GetAll() (int, error) {
	students := s.GetUserNames()
	total := 0
	for _, student := range students {
		if student != "admin" {
			n, err := read(student)
			if err != nil {
				return 0, err
			}
			total += n
		}
	}

	return total, nil
}