master
nikkiing 2 years ago
parent 6b48932683
commit baa0a28f7f
  1. 9
      transport/v1/http/transport.go

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

Loading…
Cancel
Save