1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2024-12-29 01:44:39 +02:00

&base always not nil (#1105)

This commit is contained in:
exfly@gper 2019-08-10 21:35:20 +08:00 committed by Carlos Alexandro Becker
parent b01bcabe96
commit 9c675218ad

View File

@ -5,6 +5,7 @@ import (
"net/http"
"net/url"
"os"
"reflect"
"strconv"
"github.com/apex/log"
@ -27,7 +28,7 @@ func NewGitHub(ctx *context.Context) (Client, error) {
httpClient := oauth2.NewClient(ctx, ts)
base := httpClient.Transport.(*oauth2.Transport).Base
// nolint: govet
if &base != nil {
if base == nil || reflect.ValueOf(base).IsNil() {
base = http.DefaultTransport
}
// nolint: gosec