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