// Check returns any conflicts when more then one package can be moved into
// the same path.

Check returns any conflicts when more then one package can be moved into
the same path.
// Check returns any conflicts when more then one package can be moved into // the same path .
func (ctx *Context) Check() []*Conflict {
	findDups := make(map[string][]*Operation, 3) 
	for _, op := range ctx.Operation {
		if op.State != OpReady {
			continue
		}
		findDups[op.Pkg.Path] = append(findDups[op.Pkg.Path], op)
	}
	var ret []*Conflict
	for canonical, lop := range findDups {
		if len(lop) == 1 {
			continue
		}
		destDir := path.Join(ctx.RootImportPath, ctx.VendorFolder, canonical)
		ret = append(ret, &Conflict{
			Canonical: canonical,
			Local:     destDir,
			Operation: lop,
		})
	}
	return ret
}
func ( ctx * Context ) Check ( ) [ ] * Conflict { findDups := make ( map [ string ] [ ] * Operation , 3 ) for _ , op := range ctx . Operation { if op . State != OpReady { continue } findDups [ op . Pkg . Path ] = append ( findDups [ op . Pkg . Path ] , op ) } var ret [ ] * Conflict for canonical , lop := range findDups { if len ( lop ) == 1 { continue } destDir := path . Join ( ctx . RootImportPath , ctx . VendorFolder , canonical ) ret = append ( ret , & Conflict { Canonical : canonical , Local : destDir , Operation : lop , } ) } return ret }
Check returns any conflicts when more then one package can be moved into
the same path.
Check returns any conflicts when more then one package can be moved into the same path .
// Find duplicate packages that have been marked for moving.
 // map[canonical][]local
