// ListRecords returns all known domains func ListRecords() []sham.Resource { if cache.Exists() { // get from cache stored, _ := cache.ListRecords() if len(Answers) != len(stored) { config.Log.Debug("Cache differs from local, updating...") ResetRecords(&stored, true) } } resources := make([]sham.Resource, 0) for _, v := range Answers { resources = append(resources, v) } return resources }
func TestNoneExists(t *testing.T) { noneReset() if cache.Exists() { t.Error("Cache exits but shouldn't") } }