@@ -112,7 +112,7 @@ func TestBuildGraph(t *testing.T) {
112112 desc string
113113 services types.Services
114114 disabled types.Services
115- expectedVertices map [string ]* vertex
115+ expectedVertices map [string ]* vertex [types. ServiceConfig ]
116116 expectedError string
117117 }{
118118 {
@@ -123,12 +123,12 @@ func TestBuildGraph(t *testing.T) {
123123 DependsOn : types.DependsOnConfig {},
124124 },
125125 },
126- expectedVertices : map [string ]* vertex {
126+ expectedVertices : map [string ]* vertex [types. ServiceConfig ] {
127127 "test" : {
128128 key : "test" ,
129129 service : & types.ServiceConfig {Name : "test" },
130- children : map [string ]* vertex {},
131- parents : map [string ]* vertex {},
130+ children : map [string ]* vertex [types. ServiceConfig ] {},
131+ parents : map [string ]* vertex [types. ServiceConfig ] {},
132132 },
133133 },
134134 },
@@ -144,18 +144,18 @@ func TestBuildGraph(t *testing.T) {
144144 DependsOn : types.DependsOnConfig {},
145145 },
146146 },
147- expectedVertices : map [string ]* vertex {
147+ expectedVertices : map [string ]* vertex [types. ServiceConfig ] {
148148 "test" : {
149149 key : "test" ,
150150 service : & types.ServiceConfig {Name : "test" },
151- children : map [string ]* vertex {},
152- parents : map [string ]* vertex {},
151+ children : map [string ]* vertex [types. ServiceConfig ] {},
152+ parents : map [string ]* vertex [types. ServiceConfig ] {},
153153 },
154154 "another" : {
155155 key : "another" ,
156156 service : & types.ServiceConfig {Name : "another" },
157- children : map [string ]* vertex {},
158- parents : map [string ]* vertex {},
157+ children : map [string ]* vertex [types. ServiceConfig ] {},
158+ parents : map [string ]* vertex [types. ServiceConfig ] {},
159159 },
160160 },
161161 },
@@ -173,20 +173,20 @@ func TestBuildGraph(t *testing.T) {
173173 DependsOn : types.DependsOnConfig {},
174174 },
175175 },
176- expectedVertices : map [string ]* vertex {
176+ expectedVertices : map [string ]* vertex [types. ServiceConfig ] {
177177 "test" : {
178178 key : "test" ,
179179 service : & types.ServiceConfig {Name : "test" },
180- children : map [string ]* vertex {
180+ children : map [string ]* vertex [types. ServiceConfig ] {
181181 "another" : {},
182182 },
183- parents : map [string ]* vertex {},
183+ parents : map [string ]* vertex [types. ServiceConfig ] {},
184184 },
185185 "another" : {
186186 key : "another" ,
187187 service : & types.ServiceConfig {Name : "another" },
188- children : map [string ]* vertex {},
189- parents : map [string ]* vertex {
188+ children : map [string ]* vertex [types. ServiceConfig ] {},
189+ parents : map [string ]* vertex [types. ServiceConfig ] {
190190 "test" : {},
191191 },
192192 },
@@ -204,12 +204,12 @@ func TestBuildGraph(t *testing.T) {
204204 },
205205 },
206206 },
207- expectedVertices : map [string ]* vertex {
207+ expectedVertices : map [string ]* vertex [types. ServiceConfig ] {
208208 "test" : {
209209 key : "test" ,
210210 service : & types.ServiceConfig {Name : "test" },
211- children : map [string ]* vertex {},
212- parents : map [string ]* vertex {},
211+ children : map [string ]* vertex [types. ServiceConfig ] {},
212+ parents : map [string ]* vertex [types. ServiceConfig ] {},
213213 },
214214 },
215215 },
@@ -268,30 +268,30 @@ func TestBuildGraph(t *testing.T) {
268268 DependsOn : types.DependsOnConfig {},
269269 },
270270 },
271- expectedVertices : map [string ]* vertex {
271+ expectedVertices : map [string ]* vertex [types. ServiceConfig ] {
272272 "test" : {
273273 key : "test" ,
274274 service : & types.ServiceConfig {Name : "test" },
275- children : map [string ]* vertex {
275+ children : map [string ]* vertex [types. ServiceConfig ] {
276276 "another" : {},
277277 },
278- parents : map [string ]* vertex {},
278+ parents : map [string ]* vertex [types. ServiceConfig ] {},
279279 },
280280 "another" : {
281281 key : "another" ,
282282 service : & types.ServiceConfig {Name : "another" },
283- children : map [string ]* vertex {
283+ children : map [string ]* vertex [types. ServiceConfig ] {
284284 "another_dep" : {},
285285 },
286- parents : map [string ]* vertex {
286+ parents : map [string ]* vertex [types. ServiceConfig ] {
287287 "test" : {},
288288 },
289289 },
290290 "another_dep" : {
291291 key : "another_dep" ,
292292 service : & types.ServiceConfig {Name : "another_dep" },
293- children : map [string ]* vertex {},
294- parents : map [string ]* vertex {
293+ children : map [string ]* vertex [types. ServiceConfig ] {},
294+ parents : map [string ]* vertex [types. ServiceConfig ] {
295295 "another" : {},
296296 },
297297 },
@@ -384,7 +384,7 @@ func TestWith_RootNodesAndUp(t *testing.T) {
384384 }
385385}
386386
387- func assertVertexEqual (t * testing.T , a , b vertex ) {
387+ func assertVertexEqual (t * testing.T , a , b vertex [types. ServiceConfig ] ) {
388388 assert .Equal (t , a .key , b .key )
389389 assert .Equal (t , a .service .Name , b .service .Name )
390390 for c := range a .children {
@@ -397,9 +397,9 @@ func assertVertexEqual(t *testing.T, a, b vertex) {
397397 }
398398}
399399
400- func exampleGraph () * graph {
401- graph := & graph {
402- vertices : map [string ]* vertex {},
400+ func exampleGraph () * graph [types. ServiceConfig ] {
401+ graph := & graph [types. ServiceConfig ] {
402+ vertices : map [string ]* vertex [types. ServiceConfig ] {},
403403 }
404404
405405 /** graph topology:
0 commit comments