{"modulePath":"github.com/hostinger/api-cli","version":"v1.2.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package datacenters\n\n## Variables\n\n```go\nvar GroupCmd = \u0026cobra.Command{\n\tUse:   \"datacenters\",\n\tShort: \"Datacenters commands\",\n}\n```\n\n```go\nvar ListCmd = \u0026cobra.Command{\n\tUse:   \"list\",\n\tShort: \"List available datacenters\",\n\tLong:  \"Retrieve a list of datacenters available for setting up hosting plans\\nbased on available datacenter capacity and hosting plan of your order.\\nThe first item in the list is the best match for your specific order\\nrequirements.\",\n\tRun: func(cmd *cobra.Command, args []string) {\n\t\tr, err := api.Request().HostingListAvailableDatacentersV1WithResponse(context.TODO(), listParams(cmd))\n\t\tif err != nil {\n\t\t\tlog.Fatal(err)\n\t\t}\n\n\t\toutput.Format(cmd, r.Body, r.StatusCode())\n\t},\n}\n```\n\n","path":"github.com/hostinger/api-cli/cmd/hosting/datacenters","name":"datacenters","synopsis":"","isRedistributable":true}
