From fbe19b4e31449c98a18fef5d7a3149e088759d7d Mon Sep 17 00:00:00 2001 From: Matthieu 'JP' DERASSE Date: Tue, 9 Aug 2022 15:53:40 +0000 Subject: [PATCH] refacto(models): Move models to the root of the project --- cmd/init.go | 2 +- helpers/api_types/api_type.go | 2 +- helpers/api_types/base/get_name.go | 2 +- helpers/api_types/base/get_user_input.go | 2 +- helpers/api_types/gin_gonic/get_name.go | 2 +- helpers/api_types/go_swagger/get_name.go | 2 +- helpers/api_types/go_swagger/get_user_input.go | 2 +- helpers/api_types/interface.go | 2 +- helpers/api_types/mojolicious/get_name.go | 2 +- helpers/config.go | 2 +- helpers/dependencies/git.go | 2 +- helpers/dependencies/golang.go | 2 +- helpers/dependencies/interface.go | 2 +- helpers/dependencies/swagger.go | 2 +- helpers/input.go | 2 +- {helpers/models => models}/api_type_name_enum.go | 0 {helpers/models => models}/config.go | 0 {helpers/models => models}/dependency_name_enum.go | 0 {helpers/models => models}/user_input_params.go | 0 19 files changed, 15 insertions(+), 15 deletions(-) rename {helpers/models => models}/api_type_name_enum.go (100%) rename {helpers/models => models}/config.go (100%) rename {helpers/models => models}/dependency_name_enum.go (100%) rename {helpers/models => models}/user_input_params.go (100%) diff --git a/cmd/init.go b/cmd/init.go index 4480d8f..430ac85 100644 --- a/cmd/init.go +++ b/cmd/init.go @@ -15,7 +15,7 @@ import ( "git.home.m-and-m.ovh/mderasse/gouick/helpers" "git.home.m-and-m.ovh/mderasse/gouick/helpers/api_types" - "git.home.m-and-m.ovh/mderasse/gouick/helpers/models" + "git.home.m-and-m.ovh/mderasse/gouick/models" log "github.com/sirupsen/logrus" ) diff --git a/helpers/api_types/api_type.go b/helpers/api_types/api_type.go index d58a337..e18856f 100644 --- a/helpers/api_types/api_type.go +++ b/helpers/api_types/api_type.go @@ -6,7 +6,7 @@ import ( "git.home.m-and-m.ovh/mderasse/gouick/helpers/api_types/gin_gonic" "git.home.m-and-m.ovh/mderasse/gouick/helpers/api_types/go_swagger" "git.home.m-and-m.ovh/mderasse/gouick/helpers/api_types/mojolicious" - "git.home.m-and-m.ovh/mderasse/gouick/helpers/models" + "git.home.m-and-m.ovh/mderasse/gouick/models" ) // GetAPIType will return the APIType object based on an APITypeName. diff --git a/helpers/api_types/base/get_name.go b/helpers/api_types/base/get_name.go index c127f56..5ad4605 100644 --- a/helpers/api_types/base/get_name.go +++ b/helpers/api_types/base/get_name.go @@ -1,7 +1,7 @@ package base import ( - "git.home.m-and-m.ovh/mderasse/gouick/helpers/models" + "git.home.m-and-m.ovh/mderasse/gouick/models" ) // GetName return the APITypeName of the APIType. diff --git a/helpers/api_types/base/get_user_input.go b/helpers/api_types/base/get_user_input.go index e726b34..6200244 100644 --- a/helpers/api_types/base/get_user_input.go +++ b/helpers/api_types/base/get_user_input.go @@ -1,7 +1,7 @@ package base import ( - "git.home.m-and-m.ovh/mderasse/gouick/helpers/models" + "git.home.m-and-m.ovh/mderasse/gouick/models" "github.com/juju/errors" ) diff --git a/helpers/api_types/gin_gonic/get_name.go b/helpers/api_types/gin_gonic/get_name.go index 1f13a94..7f1737f 100644 --- a/helpers/api_types/gin_gonic/get_name.go +++ b/helpers/api_types/gin_gonic/get_name.go @@ -1,7 +1,7 @@ package gin_gonic import ( - "git.home.m-and-m.ovh/mderasse/gouick/helpers/models" + "git.home.m-and-m.ovh/mderasse/gouick/models" ) // GetName return the APITypeName of the APIType. diff --git a/helpers/api_types/go_swagger/get_name.go b/helpers/api_types/go_swagger/get_name.go index 06f1479..b1fa3ec 100644 --- a/helpers/api_types/go_swagger/get_name.go +++ b/helpers/api_types/go_swagger/get_name.go @@ -1,7 +1,7 @@ package go_swagger import ( - "git.home.m-and-m.ovh/mderasse/gouick/helpers/models" + "git.home.m-and-m.ovh/mderasse/gouick/models" ) // GetName return the APITypeName of the APIType. diff --git a/helpers/api_types/go_swagger/get_user_input.go b/helpers/api_types/go_swagger/get_user_input.go index fbb3fc1..b625985 100644 --- a/helpers/api_types/go_swagger/get_user_input.go +++ b/helpers/api_types/go_swagger/get_user_input.go @@ -6,7 +6,7 @@ import ( "github.com/juju/errors" "git.home.m-and-m.ovh/mderasse/gouick/helpers" - "git.home.m-and-m.ovh/mderasse/gouick/helpers/models" + "git.home.m-and-m.ovh/mderasse/gouick/models" log "github.com/sirupsen/logrus" ) diff --git a/helpers/api_types/interface.go b/helpers/api_types/interface.go index 8c5f361..f0305e6 100644 --- a/helpers/api_types/interface.go +++ b/helpers/api_types/interface.go @@ -1,6 +1,6 @@ package api_types -import "git.home.m-and-m.ovh/mderasse/gouick/helpers/models" +import "git.home.m-and-m.ovh/mderasse/gouick/models" // APITypeInterface is the interface that need to be respected by an APIType. type APITypeInterface interface { diff --git a/helpers/api_types/mojolicious/get_name.go b/helpers/api_types/mojolicious/get_name.go index ef71511..79807e4 100644 --- a/helpers/api_types/mojolicious/get_name.go +++ b/helpers/api_types/mojolicious/get_name.go @@ -1,7 +1,7 @@ package mojolicious import ( - "git.home.m-and-m.ovh/mderasse/gouick/helpers/models" + "git.home.m-and-m.ovh/mderasse/gouick/models" ) // GetName return the APITypeName of the APIType. diff --git a/helpers/config.go b/helpers/config.go index be4bce6..693fdf3 100644 --- a/helpers/config.go +++ b/helpers/config.go @@ -7,7 +7,7 @@ import ( "github.com/juju/errors" "gopkg.in/yaml.v3" - "git.home.m-and-m.ovh/mderasse/gouick/helpers/models" + "git.home.m-and-m.ovh/mderasse/gouick/models" log "github.com/sirupsen/logrus" ) diff --git a/helpers/dependencies/git.go b/helpers/dependencies/git.go index 30b51c5..21f8e4d 100644 --- a/helpers/dependencies/git.go +++ b/helpers/dependencies/git.go @@ -3,7 +3,7 @@ package dependencies import ( "os/exec" - "git.home.m-and-m.ovh/mderasse/gouick/helpers/models" + "git.home.m-and-m.ovh/mderasse/gouick/models" "github.com/juju/errors" log "github.com/sirupsen/logrus" diff --git a/helpers/dependencies/golang.go b/helpers/dependencies/golang.go index e7c30ac..1578a4a 100644 --- a/helpers/dependencies/golang.go +++ b/helpers/dependencies/golang.go @@ -13,7 +13,7 @@ import ( "github.com/juju/errors" "git.home.m-and-m.ovh/mderasse/gouick/helpers" - "git.home.m-and-m.ovh/mderasse/gouick/helpers/models" + "git.home.m-and-m.ovh/mderasse/gouick/models" log "github.com/sirupsen/logrus" ) diff --git a/helpers/dependencies/interface.go b/helpers/dependencies/interface.go index 13b2aa5..ac9050a 100644 --- a/helpers/dependencies/interface.go +++ b/helpers/dependencies/interface.go @@ -1,6 +1,6 @@ package dependencies -import "git.home.m-and-m.ovh/mderasse/gouick/helpers/models" +import "git.home.m-and-m.ovh/mderasse/gouick/models" // DependencyInterface is the interface that need to be respected for a dependency. type DependencyInterface interface { diff --git a/helpers/dependencies/swagger.go b/helpers/dependencies/swagger.go index a7944b1..8c1ff65 100644 --- a/helpers/dependencies/swagger.go +++ b/helpers/dependencies/swagger.go @@ -10,7 +10,7 @@ import ( "runtime" "strings" - "git.home.m-and-m.ovh/mderasse/gouick/helpers/models" + "git.home.m-and-m.ovh/mderasse/gouick/models" "github.com/blang/semver" "github.com/juju/errors" diff --git a/helpers/input.go b/helpers/input.go index b815785..102ec2b 100644 --- a/helpers/input.go +++ b/helpers/input.go @@ -6,7 +6,7 @@ import ( "regexp" "strings" - "git.home.m-and-m.ovh/mderasse/gouick/helpers/models" + "git.home.m-and-m.ovh/mderasse/gouick/models" log "github.com/sirupsen/logrus" ) diff --git a/helpers/models/api_type_name_enum.go b/models/api_type_name_enum.go similarity index 100% rename from helpers/models/api_type_name_enum.go rename to models/api_type_name_enum.go diff --git a/helpers/models/config.go b/models/config.go similarity index 100% rename from helpers/models/config.go rename to models/config.go diff --git a/helpers/models/dependency_name_enum.go b/models/dependency_name_enum.go similarity index 100% rename from helpers/models/dependency_name_enum.go rename to models/dependency_name_enum.go diff --git a/helpers/models/user_input_params.go b/models/user_input_params.go similarity index 100% rename from helpers/models/user_input_params.go rename to models/user_input_params.go