Showing download sources argument in mirror show and mirror list.

This commit is contained in:
Andrey Smirnov
2014-02-15 16:56:10 +04:00
parent fb9b90e715
commit e4d8ef4744
3 changed files with 24 additions and 1 deletions
+9 -1
View File
@@ -86,7 +86,15 @@ func (repo *RemoteRepo) prepare() error {
// String interface
func (repo *RemoteRepo) String() string {
return fmt.Sprintf("[%s]: %s %s", repo.Name, repo.ArchiveRoot, repo.Distribution)
srcFlag := ""
if repo.DownloadSources {
srcFlag = " [src]"
}
distribution := repo.Distribution
if distribution == "" {
distribution = "./"
}
return fmt.Sprintf("[%s]: %s %s%s", repo.Name, repo.ArchiveRoot, distribution, srcFlag)
}
// IsFlat determines if repository is flat