VersionDataLoader.LoadServer doesn't need https://
This commit is contained in:
parent
477970b0a6
commit
a2e82ef96b
|
@ -1,7 +1,6 @@
|
|||
package twdataloader
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
phpserialize "github.com/Kichiyaki/go-php-serialize"
|
||||
"github.com/pkg/errors"
|
||||
"io/ioutil"
|
||||
|
@ -41,7 +40,7 @@ func NewVersionDataLoader(cfg *VersionDataLoaderConfig) *VersionDataLoader {
|
|||
}
|
||||
|
||||
func (dl *VersionDataLoader) LoadServers() ([]*Server, error) {
|
||||
resp, err := dl.client.Get(fmt.Sprintf("https://%s%s", dl.host, EndpointGetServers))
|
||||
resp, err := dl.client.Get(dl.host + EndpointGetServers)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "couldn't load servers")
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
)
|
||||
|
||||
func prepareTestServer(resp string) *httptest.Server {
|
||||
return httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.URL.Path {
|
||||
case EndpointGetServers:
|
||||
_, err := w.Write([]byte(resp))
|
||||
|
|
Reference in New Issue