Move config into separate package

This commit is contained in:
9seconds
2021-03-11 05:37:18 +03:00
parent 757ea5b63c
commit 1a02511afe
15 changed files with 615 additions and 552 deletions
+2 -1
View File
@@ -8,10 +8,11 @@ import (
"net/http"
"net/url"
"github.com/9seconds/mtg/v2/config"
"github.com/9seconds/mtg/v2/mtglib/network"
)
func makeNetwork(conf *config) (network.Network, error) {
func makeNetwork(conf *config.Config) (network.Network, error) {
tcpTimeout := conf.Network.Timeout.TCP.Value(network.DefaultTimeout)
idleTimeout := conf.Network.Timeout.Idle.Value(network.DefaultIdleTimeout)
dohIP := conf.Network.DOHIP.Value(net.ParseIP(network.DefaultDOHHostname)).String()