portforward.go 479 B

1234567891011121314151617181920
  1. package commands
  2. import (
  3. "fmt"
  4. "github.com/fatih/color"
  5. "github.com/spf13/cobra"
  6. )
  7. func registerCommand_PortForward() *cobra.Command {
  8. portForwardCmd := &cobra.Command{
  9. Use: "port-forward [release] [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N]",
  10. Deprecated: fmt.Sprintf("please use the %s command instead.",
  11. color.New(color.FgYellow, color.Bold).Sprintf("porter kubectl -- port-forward"),
  12. ),
  13. DisableFlagParsing: true,
  14. }
  15. return portForwardCmd
  16. }