String interface
()
| 145 | |
| 146 | // String interface |
| 147 | func (repo *RemoteRepo) String() string { |
| 148 | srcFlag := "" |
| 149 | if repo.DownloadSources { |
| 150 | srcFlag += " [src]" |
| 151 | } |
| 152 | if repo.DownloadUdebs { |
| 153 | srcFlag += " [udeb]" |
| 154 | } |
| 155 | if repo.DownloadInstaller { |
| 156 | srcFlag += " [installer]" |
| 157 | } |
| 158 | if repo.DownloadAppStream { |
| 159 | srcFlag += " [appstream]" |
| 160 | } |
| 161 | distribution := repo.Distribution |
| 162 | if distribution == "" { |
| 163 | distribution = "./" |
| 164 | } |
| 165 | return fmt.Sprintf("[%s]: %s %s%s", repo.Name, repo.ArchiveRoot, distribution, srcFlag) |
| 166 | } |
| 167 | |
| 168 | // IsFlat determines if repository is flat |
| 169 | func (repo *RemoteRepo) IsFlat() bool { |
no outgoing calls