Skip to content

Commit b7129d9

Browse files
committed
Keep configfile path when parsing Repository from config files
Turns out to be useful in the next commits
1 parent 0e77174 commit b7129d9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

repos.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ type Repository struct {
5252
Distribution string
5353
Components string
5454
Comment string
55+
56+
configFile string
5557
}
5658

5759
// Equals check if the Repository definition is equivalent to the
@@ -129,6 +131,7 @@ func parseAPTConfigFile(configPath string) (RepositoryList, error) {
129131
repo := parseAPTConfigLine(line)
130132
//fmt.Printf("%+v\n", repo)
131133
if repo != nil {
134+
repo.configFile = configPath
132135
res = append(res, repo)
133136
}
134137
}

0 commit comments

Comments
 (0)