Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for removeLastDir (0.26 sec)

  1. cmd/import-boss/main_test.go

    	table := map[string]struct{ newPath, removedDir string }{
    		"a/b/c": {"a/c", "b"},
    	}
    	for slashInput, expect := range table {
    		input := filepath.FromSlash(slashInput)
    
    		gotPath, gotRemoved := removeLastDir(input)
    		if e, a := filepath.FromSlash(expect.newPath), gotPath; e != a {
    			t.Errorf("%v: wanted %v, got %v", input, e, a)
    		}
    		if e, a := filepath.FromSlash(expect.removedDir), gotRemoved; e != a {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 16 12:36:49 UTC 2024
    - 8.8K bytes
    - Viewed (0)
Back to top