You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/12/08 09:31:11 UTC

[GitHub] [apisix-ingress-controller] gxthrj commented on a change in pull request #61: chore: enhance project structure

gxthrj commented on a change in pull request #61:
URL: https://github.com/apache/apisix-ingress-controller/pull/61#discussion_r538175616



##########
File path: cmd/ingress/ingress.go
##########
@@ -0,0 +1,112 @@
+package ingress
+
+import (
+	"context"
+	"net/http"
+	"os"
+	"os/signal"
+	"syscall"
+	"time"
+
+	"github.com/golang/glog"
+	"github.com/spf13/cobra"
+	api6Informers "github.com/gxthrj/apisix-ingress-types/pkg/client/informers/externalversions"
+
+	"github.com/api7/ingress-controller/pkg"
+	"github.com/api7/ingress-controller/pkg/config"
+	"github.com/api7/ingress-controller/log"
+	"github.com/api7/ingress-controller/pkg/ingress/controller"
+	"github.com/api7/ingress-controller/pkg/utils"
+)
+
+// NewIngressCommand creates the ingress sub command for apisix-ingress-controller.
+func NewIngressCommand() *cobra.Command {
+	var (
+		configPath string
+	)
+	conf := config.NewDefaultConfig()
+	cmd := &cobra.Command{

Review comment:
       Need to change the `/build.sh` which is used in `Dockerfile`.

##########
File path: go.mod
##########
@@ -3,26 +3,17 @@ module github.com/api7/ingress-controller
 go 1.13
 
 require (
-	github.com/coreos/etcd v3.3.18+incompatible
-	github.com/coreos/go-semver v0.3.0 // indirect
-	github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7 // indirect
-	github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
 	github.com/gogo/protobuf v1.3.1 // indirect
 	github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
-	github.com/google/uuid v1.1.1 // indirect
 	github.com/gxthrj/apisix-ingress-types v0.1.2
 	github.com/gxthrj/apisix-types v0.1.0
 	github.com/gxthrj/seven v0.1.9
 	github.com/julienschmidt/httprouter v1.3.0
-	github.com/pkg/errors v0.8.1
+	github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 // indirect

Review comment:
       How about use `mitchellh/colorstring` directly, `k0kubun/colorstring` is forked from it.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org