mirror of
https://github.com/sot-tech/mochi.git
synced 2026-07-25 09:08:09 -07:00
Begin refactor to better encapsulate configuration
This also updates the example_config.json which did not previously work. Config.Config is now composed of embedded structs of other configs that can later be used to clearly have a separation of concerns.
This commit is contained in:
+1
-1
@@ -35,7 +35,7 @@ type Storage struct {
|
||||
func NewStorage(cfg *config.Config) *Storage {
|
||||
s := &Storage{
|
||||
users: make(map[string]*models.User),
|
||||
shards: make([]Torrents, cfg.ShardConfig.TorrentMapShards),
|
||||
shards: make([]Torrents, cfg.TorrentMapShards),
|
||||
clients: make(map[string]bool),
|
||||
}
|
||||
for i := range s.shards {
|
||||
|
||||
Reference in New Issue
Block a user