如何从 golang 可执行文件中获取当前 gcloud 用户名?
How to get current gcloud user name from golang executable?
我正在尝试在 Go Lang 中实现以下 gcloud 命令。
>gcloud config get-value account
abc@def.com
我查看了“https://godoc.org/cloud.google.com/go”,但我找不到如何实现它。
我可以看看对 libraries\code 有什么建议吗?
在投入大量时间对此进行研究后,截至 2019 年 1 月没有其他选择。最佳行动方案是
gcloud config config-helper --format json
我正在尝试在 Go Lang 中实现以下 gcloud 命令。
>gcloud config get-value account
abc@def.com
我查看了“https://godoc.org/cloud.google.com/go”,但我找不到如何实现它。
我可以看看对 libraries\code 有什么建议吗?
在投入大量时间对此进行研究后,截至 2019 年 1 月没有其他选择。最佳行动方案是
gcloud config config-helper --format json