Refactor record command (#1378)
This commit is contained in:
@@ -18,10 +18,10 @@ package httptrigger
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/pkg/errors"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/satori/go.uuid"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
@@ -55,7 +55,6 @@ func (opts *CreateSubCommand) do(flags cli.Input) error {
|
||||
return opts.run(flags)
|
||||
}
|
||||
|
||||
// complete creates a environment objects and populates it with default value and CLI inputs.
|
||||
func (opts *CreateSubCommand) complete(flags cli.Input) error {
|
||||
functionList := flags.StringSlice("function")
|
||||
functionWeightsList := flags.IntSlice("weight")
|
||||
|
||||
@@ -50,7 +50,6 @@ func (opts *DeleteSubCommand) do(flags cli.Input) error {
|
||||
return opts.run(flags)
|
||||
}
|
||||
|
||||
// complete creates a environment objects and populates it with default value and CLI inputs.
|
||||
func (opts *DeleteSubCommand) complete(flags cli.Input) error {
|
||||
opts.triggerName = flags.String("name")
|
||||
opts.functionName = flags.String("function")
|
||||
|
||||
@@ -52,7 +52,6 @@ func (opts *GetSubCommand) do(flags cli.Input) error {
|
||||
return opts.run(flags)
|
||||
}
|
||||
|
||||
// complete creates a environment objects and populates it with default value and CLI inputs.
|
||||
func (opts *GetSubCommand) complete(flags cli.Input) error {
|
||||
opts.trigger = flags.String("name")
|
||||
opts.namespace = flags.String("fnNamespace")
|
||||
|
||||
@@ -46,7 +46,6 @@ func (opts *ListSubCommand) do(flags cli.Input) error {
|
||||
return opts.run(flags)
|
||||
}
|
||||
|
||||
// complete creates a environment objects and populates it with default value and CLI inputs.
|
||||
func (opts *ListSubCommand) complete(flags cli.Input) error {
|
||||
opts.triggerNamespace = flags.String("triggerNamespace")
|
||||
opts.filterFunctionName = flags.String("function")
|
||||
|
||||
@@ -50,7 +50,6 @@ func (opts *UpdateSubCommand) do(flags cli.Input) error {
|
||||
return opts.run(flags)
|
||||
}
|
||||
|
||||
// complete creates a environment objects and populates it with default value and CLI inputs.
|
||||
func (opts *UpdateSubCommand) complete(flags cli.Input) error {
|
||||
htName := flags.String("name")
|
||||
if len(htName) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user