// Modules returns all Go modules under the given Repository. The list of module names returns are shortened to be relative
// to the root of the repository.
Modules returns all Go modules under the given Repository. The list of module names returns are shortened to be relative
to the root of the repository.
// Modules returns all Go modules under the given Repository . The list of module names returns are shortened to be relative // to the root of the repository .
func (r *Repository) Modules() ([]string, error) {
	if r.modules != nil {
		return r.modules, nil
	}
	mods, err := discoverModules(r.RootPath)
	if err != nil {
		return nil, err
	}
	r.modules = mods
	return mods, err
}
func ( r * Repository ) Modules ( ) ( [ ] string , error ) { if r . modules != nil { return r . modules , nil } mods , err := discoverModules ( r . RootPath ) if err != nil { return nil , err } r . modules = mods return mods , err }
Modules returns all Go modules under the given Repository.
Modules returns all Go modules under the given Repository .