chore: rename package name
This commit is contained in:
@@ -21,7 +21,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
pkg "github.com/jkaninda/goma-gateway/internal"
|
||||
"github.com/jkaninda/goma-gateway/internal"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
@@ -34,7 +34,7 @@ var CheckConfigCmd = &cobra.Command{
|
||||
fmt.Println("no config file specified")
|
||||
os.Exit(1)
|
||||
}
|
||||
err := pkg.CheckConfig(configFile)
|
||||
err := internal.CheckConfig(configFile)
|
||||
if err != nil {
|
||||
fmt.Printf(" Error checking config file: %s\n", err)
|
||||
os.Exit(1)
|
||||
|
||||
@@ -17,9 +17,9 @@ limitations under the License.
|
||||
*/
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/jkaninda/goma-gateway/internal"
|
||||
"os"
|
||||
|
||||
pkg "github.com/jkaninda/goma-gateway/internal"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
@@ -41,7 +41,7 @@ var InitConfigCmd = &cobra.Command{
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
err := pkg.InitConfig(configFile)
|
||||
err := internal.InitConfig(configFile)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
|
||||
@@ -33,10 +33,10 @@ var ServerCmd = &cobra.Command{
|
||||
intro()
|
||||
configFile, _ := cmd.Flags().GetString("config")
|
||||
if configFile == "" {
|
||||
configFile = pkg.GetConfigPaths()
|
||||
configFile = internal.GetConfigPaths()
|
||||
}
|
||||
ctx := context.Background()
|
||||
g := pkg.GatewayServer{}
|
||||
g := internal.GatewayServer{}
|
||||
gs, err := g.Config(configFile, ctx)
|
||||
if err != nil {
|
||||
fmt.Printf("Could not load configuration: %v\n", err)
|
||||
|
||||
Reference in New Issue
Block a user