Refactor web #26

Merged
tardisx merged 8 commits from refactor-web into main 2023-11-20 07:38:17 +10:30
Showing only changes of commit 8cc5366398 - Show all commits

View File

@ -96,6 +96,7 @@ func (cs *ConfigService) LoadDefaultConfig() {
} }
// ProfileCalled returns the corresponding profile, or nil if it does not exist
func (c *Config) ProfileCalled(name string) *DownloadProfile { func (c *Config) ProfileCalled(name string) *DownloadProfile {
for _, p := range c.DownloadProfiles { for _, p := range c.DownloadProfiles {
if p.Name == name { if p.Name == name {
@ -105,6 +106,7 @@ func (c *Config) ProfileCalled(name string) *DownloadProfile {
return nil return nil
} }
// DestinationCalled returns the corresponding destination, or nil if it does not exist
func (c *Config) DestinationCalled(name string) *Destination { func (c *Config) DestinationCalled(name string) *Destination {
for _, p := range c.Destinations { for _, p := range c.Destinations {
if p.Name == name { if p.Name == name {