Пример #1
0
func FindCurrentClues(now time.Time) ([]*record.Clue, error) {
	//find current tracks
	tracks, err := table.FindCurrentTracks(now)
	if err != nil {
		return nil, err
	}

	clueIds := record.ExtractClueIdsFromTracks(tracks)
	return table.FindManyClues(clueIds)
}
Пример #2
0
func TestFindManyClues(t *T) {
	beforeClueTest()
	clues, err := table.FindManyClues([]int64{1, 2})
	rdtest.Assert(t, err == nil, err)
	rdtest.Assert(t, len(clues) == 2, "%d", len(clues))
}