GCP 上下文
非官方测试版翻译
本页面由 PageTurner AI 翻译(测试版)。未经项目官方认可。 发现错误? 报告问题 →
功能
显示当前活动的 GCP 项目、区域和账户
示例配置
- json
- yaml
- toml
{
"type": "gcp",
"style": "powerline",
"powerline_symbol": "",
"foreground": "#ffffff",
"background": "#47888d",
"template": " {{.Project}} :: {{.Account}} "
}
type: gcp
style: powerline
powerline_symbol:
foreground: "#ffffff"
background: "#47888d"
template: " {{.Project}} :: {{.Account}} "
type = "gcp"
style = "powerline"
powerline_symbol = ""
foreground = "#ffffff"
background = "#47888d"
template = " {{.Project}} :: {{.Account}} "
模板 (信息)
默认模板
{{ if .Error }}{{ .Error }}{{ else }}{{ .Project }}{{ end }}
属性
| Name | Type | Description |
|---|---|---|
.Project | string | the currently active project |
.Account | string | the currently active account |
.Region | string | default region for the active context |
.ActiveConfig | string | the active configuration name |
.Error | string | contains any error messages generated when trying to load the GCP config |