github.com/palantir/godel-dep-plugin@v1.1.1-0.20201218041358-274eaa9b1310/cmd/run.go (about)

     1  // Copyright (c) 2018 Palantir Technologies Inc. All rights reserved.
     2  // Use of this source code is governed by the Apache License, Version 2.0
     3  // that can be found in the LICENSE file.
     4  
     5  package cmd
     6  
     7  import (
     8  	"github.com/spf13/cobra"
     9  
    10  	"github.com/palantir/godel-dep-plugin/depplugin"
    11  )
    12  
    13  var runCmd = &cobra.Command{
    14  	Use:   "run [flags] [args]",
    15  	Short: "Run dep with the provided arguments",
    16  	Long: `Executes "dep" using the bundled version of dep with the provided flags and arguments. The "--" separator must be used 
    17  before specifying any flags for the "dep" program. For example, "./godelw run-dep -- -h" executes "dep -h".`,
    18  	RunE: func(cmd *cobra.Command, args []string) error {
    19  		return depplugin.Run(args, cmd.OutOrStdout())
    20  	},
    21  }
    22  
    23  func init() {
    24  	rootCmd.AddCommand(runCmd)
    25  }