(cmd *cobra.Command, args []string)
| 286 | } |
| 287 | |
| 288 | func exampleDomainConfig(cmd *cobra.Command, args []string) { |
| 289 | if len(args) == 0 { |
| 290 | fmt.Fprintf(os.Stderr, "must specify domain_type.\nExample: %s\n%s\n", cmd.Example, cmd.Long) |
| 291 | return |
| 292 | } |
| 293 | |
| 294 | switch common.GetDomainTypeByName(args[0]) { |
| 295 | case common.DOMAIN_TYPE_KUBERNETES: |
| 296 | fmt.Printf(string(example.YamlDomainKubernetes)) |
| 297 | case common.DOMAIN_TYPE_ALIYUN: |
| 298 | fmt.Printf(string(example.YamlDomainAliYun)) |
| 299 | case common.DOMAIN_TYPE_AWS: |
| 300 | fmt.Printf(string(example.YamlDomainAws)) |
| 301 | case common.DOMAIN_TYPE_TENCENT: |
| 302 | fmt.Printf(string(example.YamlDomainTencent)) |
| 303 | case common.DOMAIN_TYPE_HUAWEI: |
| 304 | fmt.Printf(string(example.YamlDomainHuawei)) |
| 305 | case common.DOMAIN_TYPE_QINGCLOUD: |
| 306 | fmt.Printf(string(example.YamlDomainQingCloud)) |
| 307 | case common.DOMAIN_TYPE_BAIDU_BCE: |
| 308 | fmt.Printf(string(example.YamlDomainBaiduBce)) |
| 309 | case common.DOMAIN_TYPE_AGENT_SYNC: |
| 310 | fmt.Printf(string(example.YamlDomainGenesis)) |
| 311 | case common.DOMAIN_TYPE_FILEREADER: |
| 312 | fmt.Printf(string(example.YamlDomainFileReader)) |
| 313 | case common.DOMAIN_TYPE_VOLCENGINE: |
| 314 | fmt.Printf(string(example.YamlDomainVolcengine)) |
| 315 | default: |
| 316 | err := fmt.Sprintf("domain_type %s not supported\n", args[0]) |
| 317 | fmt.Fprintln(os.Stderr, err) |
| 318 | } |
| 319 | } |
| 320 | |
| 321 | func formatBody(filename string) (map[string]interface{}, error) { |
| 322 | upperBody := make(map[string]interface{}) |
no outgoing calls
no test coverage detected