|
|
@ -10,12 +10,13 @@ type Transport struct { |
|
|
|
apiKey string // apiKey
|
|
|
|
apiKey string // apiKey
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// args 0: sm4Key, 1: apiKey
|
|
|
|
func NewTransport(env enum.Env, args ...string) *Transport { |
|
|
|
func NewTransport(env enum.Env, args ...string) *Transport { |
|
|
|
var sm4Key, apiKey string |
|
|
|
var sm4Key, apiKey string |
|
|
|
if len(args) > 1 { |
|
|
|
if len(args) > 0 { |
|
|
|
sm4Key = args[0] |
|
|
|
sm4Key = args[0] |
|
|
|
} |
|
|
|
} |
|
|
|
if len(args) > 2 { |
|
|
|
if len(args) > 1 { |
|
|
|
apiKey = args[1] |
|
|
|
apiKey = args[1] |
|
|
|
} |
|
|
|
} |
|
|
|
return &Transport{ |
|
|
|
return &Transport{ |
|
|
|