func LSRCommand(runtime *program.SubRuntime) (retval int, err string) {
	shouldCanon := runtime.Flag

	// conditionally read the canon lines
	var lines []repos.CanLine
	var e error
	if shouldCanon {
		lines, e = program.GetCanonOrPanic()
		if e != nil {
			err = constants.StringInvalidCanfile
			retval = constants.ErrorMissingConfig
			return
		}
	}

	// get the root
	root := runtime.Root

	// find all the repos
	rs := repos.Repos(root, runtime.For)

	// and print them
	for _, repo := range rs {
		remote, err := git.Default.GetRemote(repo)
		if err == nil {
			if shouldCanon {
				printCanonOrError(lines, remote)
			} else {
				fmt.Println(remote)

			}
		}
	}

	return
}
// LSRCommand is the entry point for the lsr command
LSRCommand is the entry point for the lsr command
// LSRCommand is the entry point for the lsr command
func LSRCommand(runtime *program.SubRuntime) (retval int, err string) {
	shouldCanon := runtime.Flag
	var lines []repos.CanLine
	var e error
	if shouldCanon {
		lines, e = program.GetCanonOrPanic()
		if e != nil {
			err = constants.StringInvalidCanfile
			retval = constants.ErrorMissingConfig
			return
		}
	}
	root := runtime.Root
	rs := repos.Repos(root, runtime.For)
	for _, repo := range rs {
		remote, err := git.Default.GetRemote(repo)
		if err == nil {
			if shouldCanon {
				printCanonOrError(lines, remote)
			} else {
				fmt.Println(remote)
			}
		}
	}
	return
}
func LSRCommand ( runtime * program . SubRuntime ) ( retval int , err string ) { shouldCanon := runtime . Flag var lines [ ] repos . CanLine var e error if shouldCanon { lines , e = program . GetCanonOrPanic ( ) if e != nil { err = constants . StringInvalidCanfile retval = constants . ErrorMissingConfig return } } root := runtime . Root rs := repos . Repos ( root , runtime . For ) for _ , repo := range rs { remote , err := git . Default . GetRemote ( repo ) if err == nil { if shouldCanon { printCanonOrError ( lines , remote ) } else { fmt . Println ( remote ) } } } return }
LSRCommand is the entry point for the lsr command
LSRCommand is the entry point for the lsr command
// conditionally read the canon lines // get the root // find all the repos // and print them