refato(global); Fix error on input, better log

This commit is contained in:
Matthieu 'JP' DERASSE
2022-08-09 21:37:39 +00:00
parent eb8befc77c
commit 3536298742
6 changed files with 47 additions and 6 deletions

View File

@ -2,9 +2,11 @@ package base
import (
"github.com/juju/errors"
"git.home.m-and-m.ovh/mderasse/gouick/helpers"
)
// 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())
return errors.NotImplementedf("%s not implemented for %s", helpers.GetCurrentFuncName(), a.GetName())
}

View File

@ -1,12 +1,13 @@
package base
import (
"git.home.m-and-m.ovh/mderasse/gouick/models"
"github.com/juju/errors"
"git.home.m-and-m.ovh/mderasse/gouick/helpers"
"git.home.m-and-m.ovh/mderasse/gouick/models"
)
// GetInitializeUserInput will ask user to provide information that allow initialization of a project.
func (a APIType) GetInitializeUserInput(params *models.Config) (*models.Config, error) {
return nil, errors.NotImplementedf("GetInitializeUserInput not implemented for %s", a.GetName())
return nil, errors.NotImplementedf("%s not implemented for %s", helpers.GetCurrentFuncName(), a.GetName())
}

View File

@ -12,7 +12,7 @@ import (
// CheckInitialize will do preliminary check before initializing a new project.
func (a APIType) CheckInitialize() error {
log.Debugf("Starting %s check initialize", string(a.GetName()))
log.Debugf("Starting %s - %s", a.GetName(), helpers.GetCurrentFuncName())
// Get current path
log.Debug("Getting current location")

View File

@ -13,7 +13,7 @@ import (
// GetInitializeUserInput will ask user to provide information that allow initialization of a project.
func (a APIType) GetInitializeUserInput(params *models.Config) (*models.Config, error) {
log.Debugf("Starting %s user input", a.GetName())
log.Debugf("Starting %s - %s", a.GetName(), helpers.GetCurrentFuncName())
// Get current path
log.Debug("Getting current location")