Add staticcheck fixes (#3221)
* Add staticcheck fixes Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> * update golangci-lint version Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> --------- Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -342,8 +342,8 @@ func (opts *CreateSubCommand) complete(input cli.Input) error {
|
||||
// generatePackageName => will return package name by appending id in function name and will make sure that package name will never be more than length of 63 characters.
|
||||
func generatePackageName(fnName string, id string) string {
|
||||
var (
|
||||
lenFnName int = len(fnName)
|
||||
lenId int = len(id)
|
||||
lenFnName = len(fnName)
|
||||
lenId = len(id)
|
||||
lastIndexOfChar int
|
||||
)
|
||||
if lenFnName+lenId <= 62 {
|
||||
|
||||
@@ -130,7 +130,7 @@ func (opts *TestSubCommand) do(input cli.Input) error {
|
||||
if len(methods) == 0 {
|
||||
return errors.New("HTTP method not mentioned")
|
||||
} else if len(methods) > 1 {
|
||||
return errors.New("More than one HTTP method not supported")
|
||||
return errors.New("more than one HTTP method not supported")
|
||||
}
|
||||
method, err := httptrigger.GetMethod(methods[0])
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user