github.com/mloves0824/enron/cmd/enron@v0.0.0-20230830012320-113bbf6be3c8/internal/upgrade/upgrade.go (about) 1 package upgrade 2 3 import ( 4 "fmt" 5 6 "github.com/spf13/cobra" 7 8 "github.com/mloves0824/enron/cmd/enron/internal/base" 9 ) 10 11 // CmdUpgrade represents the upgrade command. 12 var CmdUpgrade = &cobra.Command{ 13 Use: "upgrade", 14 Short: "Upgrade the enron tools", 15 Long: "Upgrade the enron tools. Example: enron upgrade", 16 Run: Run, 17 } 18 19 // Run upgrade the enron tools. 20 func Run(_ *cobra.Command, _ []string) { 21 err := base.GoInstall( 22 "github.com/mloves0824/enron/cmd/enron@latest", 23 "github.com/mloves0824/enron/cmd/protoc-gen-go-http@latest", 24 "github.com/mloves0824/enron/cmd/protoc-gen-go-errors@latest", 25 "google.golang.org/protobuf/cmd/protoc-gen-go@latest", 26 "google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest", 27 "github.com/google/gnostic/cmd/protoc-gen-openapi@latest", 28 ) 29 if err != nil { 30 fmt.Println(err) 31 } 32 }