Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for filterRecursiveEntries (0.11 sec)

  1. cmd/metacache-entries_test.go

    	if !reflect.DeepEqual(want, got) {
    		t.Errorf("got unexpected result: %#v", got)
    	}
    }
    
    func Test_metaCacheEntries_filterRecursive(t *testing.T) {
    	data := loadMetacacheSampleEntries(t)
    	data.filterRecursiveEntries("src/compress/bzip2/", slashSeparator)
    	got := data.entries().names()
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Jan 02 17:15:06 UTC 2022
    - 31.6K bytes
    - Viewed (0)
  2. cmd/metacache-entries.go

    			dst = append(dst, o)
    		}
    	}
    	m.o = dst
    }
    
    // filterRecursiveEntries will keep entries only with the prefix that doesn't contain separator.
    // This can be used to remove recursive listings.
    // To return root elements only set prefix to an empty string.
    // Order is preserved, but the underlying slice is modified.
    func (m *metaCacheEntriesSorted) filterRecursiveEntries(prefix, separator string) {
    	dst := m.o[:0]
    	if prefix != "" {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 08 15:29:58 UTC 2024
    - 24.1K bytes
    - Viewed (0)
Back to top