加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main.go 739 Bytes
一键复制 编辑 原始数据 按行查看 历史
Will May 提交于 2023-06-23 11:01 . Fix bug when peering a GCP VPC (#392)
package main
import (
"flag"
"log"
"github.com/RedisLabs/terraform-provider-rediscloud/provider"
"github.com/hashicorp/terraform-plugin-sdk/v2/plugin"
)
var (
// Provided by goreleaser configuration for each binary
// Allows goreleaser to pass version details
version = "dev"
)
func main() {
var debugMode bool
flag.BoolVar(&debugMode, "debug", false, "set to true to run the provider with support for debuggers like delve")
flag.Parse()
opts := &plugin.ServeOpts{ProviderFunc: provider.New(version)}
// Prevent logger from prepending date/time to logs, which breaks log-level parsing/filtering
log.SetFlags(0)
if debugMode {
opts.Debug = true
opts.ProviderAddr = "RedisLabs/rediscloud"
}
plugin.Serve(opts)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化