mirror of
https://github.com/Jguer/yay.git
synced 2024-11-08 01:57:20 +01:00
47 lines
1.1 KiB
Go
47 lines
1.1 KiB
Go
|
package pacmanconf
|
||
|
|
||
|
type Repository struct {
|
||
|
Name string
|
||
|
Servers []string
|
||
|
SigLevel []string
|
||
|
Usage []string
|
||
|
}
|
||
|
|
||
|
type Config struct {
|
||
|
RootDir string
|
||
|
DBPath string
|
||
|
CacheDir []string
|
||
|
HookDir []string
|
||
|
GPGDir string
|
||
|
LogFile string
|
||
|
HoldPkg []string
|
||
|
IgnorePkg []string
|
||
|
IgnoreGroup []string
|
||
|
Architecture string
|
||
|
XferCommand string
|
||
|
NoUpgrade []string
|
||
|
NoExtract []string
|
||
|
CleanMethod []string
|
||
|
SigLevel []string
|
||
|
LocalFileSigLevel []string
|
||
|
RemoteFileSigLevel []string
|
||
|
UseSyslog bool
|
||
|
Color bool
|
||
|
UseDelta float64
|
||
|
TotalDownload bool
|
||
|
CheckSpace bool
|
||
|
VerbosePkgLists bool
|
||
|
DisableDownloadTimeout bool
|
||
|
Repos []Repository
|
||
|
}
|
||
|
|
||
|
func (conf *Config) Repository(name string) *Repository {
|
||
|
for _, repo := range conf.Repos {
|
||
|
if repo.Name == name {
|
||
|
return &repo
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|