通用包
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
utils/transport/v1/http/transport.go

28 lines
456 B

package http
import (
"gitea.drugeyes.vip/pharnexbase/utils/enum"
)
type Transport struct {
env enum.Env // 环境
sm4Key string // sm4Key
apiKey string // apiKey
}
2 years ago
// args 0: sm4Key, 1: apiKey
2 years ago
func NewTransport(env enum.Env, args ...string) *Transport {
var sm4Key, apiKey string
2 years ago
if len(args) > 0 {
2 years ago
sm4Key = args[0]
}
2 years ago
if len(args) > 1 {
2 years ago
apiKey = args[1]
}
return &Transport{
env: env,
sm4Key: sm4Key,
apiKey: apiKey,
}
}