Skip to content

Commit f5d7eae

Browse files
committed
Stub new function configs.Navigate
This function will navigate the filesystem scraping the fs searching for config files. It will search in $pwd navigating through parent folders stopping at $root
1 parent 7112bc2 commit f5d7eae

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

configs/navigate.go

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package configs
2+
3+
func Navigate(root, pwd string) Configuration {
4+
return Configuration{}
5+
}

configs/navigate_test.go

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package configs_test
2+
3+
import (
4+
"reflect"
5+
"testing"
6+
)
7+
8+
func TestNavigate(t *testing.T) {
9+
type args struct {
10+
root string
11+
pwd string
12+
}
13+
tests := []struct {
14+
name string
15+
args args
16+
want Configuration
17+
}{
18+
// TODO: Add test cases.
19+
}
20+
for _, tt := range tests {
21+
t.Run(tt.name, func(t *testing.T) {
22+
if got := Navigate(tt.args.root, tt.args.pwd); !reflect.DeepEqual(got, tt.want) {
23+
t.Errorf("Navigate() = %v, want %v", got, tt.want)
24+
}
25+
})
26+
}
27+
}

0 commit comments

Comments
 (0)