@@ -17,14 +17,16 @@ func TestTree_checkAndSetFromEnv(t *testing.T) {
1717	// create a new fig tree 
1818	var  figs  * figTree 
1919	figs  =  & figTree {
20- 		harvest :     1 ,
21- 		figs :        make (map [string ]* figFruit ),
22- 		tracking :    false ,
23- 		withered :    make (map [string ]witheredFig ),
24- 		flagSet :     flag .NewFlagSet (os .Args [0 ], flag .ContinueOnError ),
25- 		mu :          sync.RWMutex {},
26- 		mutationsCh : make (chan  Mutation , 1 ),
27- 		filterTests : true ,
20+ 		harvest :      1 ,
21+ 		figs :         make (map [string ]* figFruit ),
22+ 		tracking :     false ,
23+ 		withered :     make (map [string ]witheredFig ),
24+ 		sources :      make (map [string ]SourceConfig ),
25+ 		sourceLocker : sync.RWMutex {},
26+ 		flagSet :      flag .NewFlagSet (os .Args [0 ], flag .ContinueOnError ),
27+ 		mu :           sync.RWMutex {},
28+ 		mutationsCh :  make (chan  Mutation , 1 ),
29+ 		filterTests :  true ,
2830	}
2931
3032	// assign an int to k 
@@ -61,6 +63,8 @@ func TestTree_setValue(t *testing.T) {
6163		ConfigFilePath  string 
6264		figs            map [string ]* figFruit 
6365		withered        map [string ]witheredFig 
66+ 		sources         map [string ]SourceConfig 
67+ 		sourceLocker    sync.RWMutex 
6468		mu              sync.RWMutex 
6569		tracking        bool 
6670		mutationsCh     chan  Mutation 
@@ -79,9 +83,11 @@ func TestTree_setValue(t *testing.T) {
7983		{
8084			name : "Set int value" ,
8185			fields : fields {
82- 				figs :        make (map [string ]* figFruit ),
83- 				withered :    make (map [string ]witheredFig ),
84- 				mutationsCh : make (chan  Mutation , 1 ),
86+ 				figs :         make (map [string ]* figFruit ),
87+ 				withered :     make (map [string ]witheredFig ),
88+ 				mutationsCh :  make (chan  Mutation , 1 ),
89+ 				sources :      make (map [string ]SourceConfig ),
90+ 				sourceLocker : sync.RWMutex {},
8591			},
8692			args : args {
8793				flagVal : new (int ),
@@ -93,9 +99,11 @@ func TestTree_setValue(t *testing.T) {
9399		{
94100			name : "Set string value" ,
95101			fields : fields {
96- 				figs :        make (map [string ]* figFruit ),
97- 				withered :    make (map [string ]witheredFig ),
98- 				mutationsCh : make (chan  Mutation , 1 ),
102+ 				figs :         make (map [string ]* figFruit ),
103+ 				withered :     make (map [string ]witheredFig ),
104+ 				mutationsCh :  make (chan  Mutation , 1 ),
105+ 				sources :      make (map [string ]SourceConfig ),
106+ 				sourceLocker : sync.RWMutex {},
99107			},
100108			args : args {
101109				flagVal : new (string ),
@@ -107,9 +115,11 @@ func TestTree_setValue(t *testing.T) {
107115		{
108116			name : "Invalid type" ,
109117			fields : fields {
110- 				figs :        make (map [string ]* figFruit ),
111- 				withered :    make (map [string ]witheredFig ),
112- 				mutationsCh : make (chan  Mutation , 1 ),
118+ 				figs :         make (map [string ]* figFruit ),
119+ 				withered :     make (map [string ]witheredFig ),
120+ 				mutationsCh :  make (chan  Mutation , 1 ),
121+ 				sources :      make (map [string ]SourceConfig ),
122+ 				sourceLocker : sync.RWMutex {},
113123			},
114124			args : args {
115125				flagVal : new (float32 ), // Unsupported type 
@@ -150,13 +160,15 @@ func TestTree_setValue(t *testing.T) {
150160
151161func  TestTree_setValuesFromMap (t  * testing.T ) {
152162	tree  :=  & figTree {
153- 		figs :        make (map [string ]* figFruit ),
154- 		withered :    make (map [string ]witheredFig ),
155- 		mu :          sync.RWMutex {},
156- 		tracking :    false ,
157- 		mutationsCh : make (chan  Mutation , 1 ),
158- 		flagSet :     flag .NewFlagSet (os .Args [0 ], flag .ContinueOnError ),
159- 		filterTests : true ,
163+ 		figs :         make (map [string ]* figFruit ),
164+ 		withered :     make (map [string ]witheredFig ),
165+ 		sources :      make (map [string ]SourceConfig ),
166+ 		sourceLocker : sync.RWMutex {},
167+ 		mu :           sync.RWMutex {},
168+ 		tracking :     false ,
169+ 		mutationsCh :  make (chan  Mutation , 1 ),
170+ 		flagSet :      flag .NewFlagSet (os .Args [0 ], flag .ContinueOnError ),
171+ 		filterTests :  true ,
160172	}
161173	m  :=  map [string ]interface {}{
162174		"name" : "yahuah" ,
0 commit comments