mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-09 01:50:30 +00:00
feat: support more configurations (#281)
This commit is contained in:
14 files changed
+145
-94
No files matched your search
@@ -314,11 +314,11 @@ func buildConfigFetcher() fetcher.Fetcher {
|
||||
mockCfg := config{
|
||||
Connections: 16,
|
||||
}
|
||||
newController.GetConfig = func(v any) (bool, error) {
|
||||
newController.GetConfig = func(v any) bool {
|
||||
if err := json.Unmarshal([]byte(test.ToJson(mockCfg)), v); err != nil {
|
||||
return false, err
|
||||
return false
|
||||
}
|
||||
return true, nil
|
||||
return true
|
||||
}
|
||||
fetcher.Setup(newController)
|
||||
return fetcher
|
||||
|
||||
Reference in new issue
Block a user