fix(lint): Continue to apply linter recommandation
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@ -9,6 +9,7 @@ import (
|
||||
"git.home.m-and-m.ovh/mderasse/gouick/helpers/models"
|
||||
)
|
||||
|
||||
// GetAPIType will return the APIType object based on an APITypeName.
|
||||
func GetAPIType(in models.APITypeName) (APITypeInterface, error) {
|
||||
if in == "" {
|
||||
return nil, errors.BadRequestf("missing parameter")
|
||||
@ -25,6 +26,8 @@ func GetAPIType(in models.APITypeName) (APITypeInterface, error) {
|
||||
return go_swagger.APIType{}, nil
|
||||
case models.APITypeName_MOJOLICIOUS:
|
||||
return mojolicious.APIType{}, nil
|
||||
case models.APITypeName_NULL:
|
||||
break
|
||||
}
|
||||
|
||||
return nil, errors.NotFoundf("Unknown Api Type")
|
||||
|
@ -1,5 +1,5 @@
|
||||
package base
|
||||
|
||||
// APIType
|
||||
// APIType struct.
|
||||
type APIType struct {
|
||||
}
|
||||
|
@ -4,8 +4,7 @@ import (
|
||||
"github.com/juju/errors"
|
||||
)
|
||||
|
||||
// CheckInitialize
|
||||
// CheckInitialize will do preliminary check before initializing a new project.
|
||||
func (a APIType) CheckInitialize() error {
|
||||
|
||||
return errors.NotImplementedf("CheckInitialize not implemented for %s", a.GetName())
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"git.home.m-and-m.ovh/mderasse/gouick/helpers/models"
|
||||
)
|
||||
|
||||
// GetName return the APITypeName of the APIType.
|
||||
func (a APIType) GetName() models.APITypeName {
|
||||
return models.APITypeName_NULL
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"github.com/juju/errors"
|
||||
)
|
||||
|
||||
// GetInitializeUserInput will ask user to provide information that allow initialization of a project.
|
||||
func (a APIType) GetInitializeUserInput(params *models.UserInputParams) (*models.UserInputParams, error) {
|
||||
|
||||
return nil, errors.NotImplementedf("GetInitializeUserInput not implemented for %s", a.GetName())
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"git.home.m-and-m.ovh/mderasse/gouick/helpers/models"
|
||||
)
|
||||
|
||||
// GetName return the APITypeName of the APIType.
|
||||
func (a APIType) GetName() models.APITypeName {
|
||||
return models.APITypeName_GIN_GONIC
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// CheckInitialize
|
||||
// CheckInitialize will do preliminary check before initializing a new project.
|
||||
func (a APIType) CheckInitialize() error {
|
||||
|
||||
log.Debugf("Starting %s check initialize", string(a.GetName()))
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"git.home.m-and-m.ovh/mderasse/gouick/helpers/models"
|
||||
)
|
||||
|
||||
// GetName return the APITypeName of the APIType.
|
||||
func (a APIType) GetName() models.APITypeName {
|
||||
return models.APITypeName_GO_SWAGGER
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// GetInitializeUserInput
|
||||
// GetInitializeUserInput will ask user to provide information that allow initialization of a project.
|
||||
func (a APIType) GetInitializeUserInput(params *models.UserInputParams) (*models.UserInputParams, error) {
|
||||
|
||||
log.Debugf("Starting %s user input", a.GetName())
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"git.home.m-and-m.ovh/mderasse/gouick/helpers/models"
|
||||
)
|
||||
|
||||
// GetName return the APITypeName of the APIType.
|
||||
func (a APIType) GetName() models.APITypeName {
|
||||
return models.APITypeName_MOJOLICIOUS
|
||||
}
|
||||
|
Reference in New Issue
Block a user