用于在 golang 中关闭会话的 Softlayer API?

我正在使用 softlayer go 客户端 https://github.com/softlayer/softlayer-go

我无法关闭软层会话。我怎么做?

我已经使用 API 创建了软层会话Session.New()

慕妹3242003
浏览 145回答 1
1回答

胡子哥哥

https://github.com/softlayer/softlayer-go/blob/master/session/session.go 基本上通过将用户名、apiKey、端点、超时等存储在变量中来配置 go-client,这些变量用于每次都向 API 发出请求。如果您查看SoftLayer API,它没有任何创建/关闭会话的方法,所以如果您想模拟类似的东西,那么我认为您可以尝试将空白值发送到并Session.New()删除~/.softlayer文件中存储的任何值
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Go