This is an automated email from the ASF dual-hosted git repository.

albumenj pushed a commit to branch xds-istio
in repository https://gitbox.apache.org/repos/asf/dubbo-go-pixiu-samples.git

commit 03a60731fcd2763fb46fa3170244abf118d63450
Author: mazhihui <[email protected]>
AuthorDate: Sun Jul 31 11:53:34 2022 +0800

    fix formatter
---
 dubbogo/simple/triple/server/app/greeter.go        |  6 ++----
 grpc/server/app/server.go                          |  6 ++----
 grpc/test/pixiu_test.go                            |  6 ++----
 http/grpc/server/app/server.go                     |  8 +++----
 http/grpc/test/pixiu_test.go                       |  6 ++----
 http/simple/test/pixiu_test.go                     |  6 ++----
 pixiu/gateway.go                                   |  6 ++----
 pixiu/pixiu.go                                     | 10 ++++-----
 xds/dubbo-go-istio/server/api/api.pb.go            | 25 +++++++++++++++++++---
 xds/dubbo-go-istio/server/api/api_triple.pb.go     | 25 ++++++++++++++++++++--
 xds/dubbo-go-istio/server/cmd/app.go               | 18 ++++++++++++++++
 .../server/pkg/service/dubbo-greeting-service.go   | 21 ++++++++++++++++++
 xds/dubbo-go-istio/server/pkg/service/service.go   | 21 ++++++++++++++++++
 xds/filesystem-control-panel/server/main.go        |  8 ++++---
 .../server/app/resoruce_pixiu2.go                  |  8 ++++---
 .../server/app/resource_pixiu.go                   |  6 +++---
 16 files changed, 137 insertions(+), 49 deletions(-)

diff --git a/dubbogo/simple/triple/server/app/greeter.go 
b/dubbogo/simple/triple/server/app/greeter.go
index 5edbf40..5f7d7e2 100644
--- a/dubbogo/simple/triple/server/app/greeter.go
+++ b/dubbogo/simple/triple/server/app/greeter.go
@@ -25,11 +25,9 @@ import (
 import (
        "dubbo.apache.org/dubbo-go/v3/common/logger"
 
-       tripleConstant "github.com/dubbogo/triple/pkg/common/constant"
-)
-
-import (
        triplepb 
"github.com/apache/dubbo-go-pixiu/samples/dubbogo/simple/triple/server/protobuf/api"
+
+       tripleConstant "github.com/dubbogo/triple/pkg/common/constant"
 )
 
 type GreeterProvider struct {
diff --git a/grpc/server/app/server.go b/grpc/server/app/server.go
index 776d4cc..71ca5bd 100644
--- a/grpc/server/app/server.go
+++ b/grpc/server/app/server.go
@@ -22,13 +22,11 @@ import (
        "net"
 )
 
-import (
-       "google.golang.org/grpc"
-)
-
 import (
        "github.com/apache/dubbo-go-pixiu/pkg/logger"
        "github.com/apache/dubbo-go-pixiu/samples/http/grpc/proto"
+
+       "google.golang.org/grpc"
 )
 
 const (
diff --git a/grpc/test/pixiu_test.go b/grpc/test/pixiu_test.go
index d72fb48..7921526 100644
--- a/grpc/test/pixiu_test.go
+++ b/grpc/test/pixiu_test.go
@@ -26,16 +26,14 @@ import (
 )
 
 import (
+       pb "github.com/apache/dubbo-go-pixiu/samples/http/grpc/proto"
+
        "github.com/stretchr/testify/assert"
 
        "google.golang.org/grpc"
        "google.golang.org/grpc/credentials/insecure"
 )
 
-import (
-       pb "github.com/apache/dubbo-go-pixiu/samples/http/grpc/proto"
-)
-
 var (
        addr = flag.String("addr", "localhost:8881", "the address to connect 
to")
 )
diff --git a/http/grpc/server/app/server.go b/http/grpc/server/app/server.go
index bfa7221..eedcb2c 100644
--- a/http/grpc/server/app/server.go
+++ b/http/grpc/server/app/server.go
@@ -22,14 +22,12 @@ import (
        "net"
 )
 
-import (
-       "google.golang.org/grpc"
-       "google.golang.org/grpc/reflection"
-)
-
 import (
        "github.com/apache/dubbo-go-pixiu/pkg/logger"
        "github.com/apache/dubbo-go-pixiu/samples/http/grpc/proto"
+
+       "google.golang.org/grpc"
+       "google.golang.org/grpc/reflection"
 )
 
 const (
diff --git a/http/grpc/test/pixiu_test.go b/http/grpc/test/pixiu_test.go
index caeb302..0ed7921 100644
--- a/http/grpc/test/pixiu_test.go
+++ b/http/grpc/test/pixiu_test.go
@@ -27,12 +27,10 @@ import (
        "time"
 )
 
-import (
-       "github.com/stretchr/testify/assert"
-)
-
 import (
        "github.com/apache/dubbo-go-pixiu/samples/http/grpc/proto"
+
+       "github.com/stretchr/testify/assert"
 )
 
 const (
diff --git a/http/simple/test/pixiu_test.go b/http/simple/test/pixiu_test.go
index 666ed32..6b21306 100644
--- a/http/simple/test/pixiu_test.go
+++ b/http/simple/test/pixiu_test.go
@@ -25,12 +25,10 @@ import (
        "time"
 )
 
-import (
-       "github.com/stretchr/testify/assert"
-)
-
 import (
        "github.com/apache/dubbo-go-pixiu/pkg/common/constant"
+
+       "github.com/stretchr/testify/assert"
 )
 
 func TestPost(t *testing.T) {
diff --git a/pixiu/gateway.go b/pixiu/gateway.go
index 2052a81..f4f9d0a 100644
--- a/pixiu/gateway.go
+++ b/pixiu/gateway.go
@@ -21,14 +21,12 @@ import (
        "os"
 )
 
-import (
-       "github.com/spf13/cobra"
-)
-
 import (
        "github.com/apache/dubbo-go-pixiu/pkg/common/constant"
        "github.com/apache/dubbo-go-pixiu/pkg/logger"
        "github.com/apache/dubbo-go-pixiu/pkg/server"
+
+       "github.com/spf13/cobra"
 )
 
 var (
diff --git a/pixiu/pixiu.go b/pixiu/pixiu.go
index 930a2ed..52ac1f4 100644
--- a/pixiu/pixiu.go
+++ b/pixiu/pixiu.go
@@ -25,18 +25,16 @@ import (
        "time"
 )
 
-import (
-       gxruntime "github.com/dubbogo/gost/runtime"
-
-       "github.com/spf13/cobra"
-)
-
 import (
        "github.com/apache/dubbo-go-pixiu/pkg/common/constant"
        "github.com/apache/dubbo-go-pixiu/pkg/config"
        "github.com/apache/dubbo-go-pixiu/pkg/logger"
        "github.com/apache/dubbo-go-pixiu/pkg/model"
        _ "github.com/apache/dubbo-go-pixiu/pkg/pluginregistry"
+
+       gxruntime "github.com/dubbogo/gost/runtime"
+
+       "github.com/spf13/cobra"
 )
 
 var (
diff --git a/xds/dubbo-go-istio/server/api/api.pb.go 
b/xds/dubbo-go-istio/server/api/api.pb.go
index 7f98cb4..f8897da 100644
--- a/xds/dubbo-go-istio/server/api/api.pb.go
+++ b/xds/dubbo-go-istio/server/api/api.pb.go
@@ -1,4 +1,19 @@
-// EDIT IT, change to your package, service and message
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
@@ -9,12 +24,16 @@
 package api
 
 import (
-       protoreflect "google.golang.org/protobuf/reflect/protoreflect"
-       protoimpl "google.golang.org/protobuf/runtime/protoimpl"
        reflect "reflect"
        sync "sync"
 )
 
+import (
+       protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+
+       protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
 const (
        // Verify that this generated code is sufficiently up-to-date.
        _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
diff --git a/xds/dubbo-go-istio/server/api/api_triple.pb.go 
b/xds/dubbo-go-istio/server/api/api_triple.pb.go
index 2448bf0..f44201b 100644
--- a/xds/dubbo-go-istio/server/api/api_triple.pb.go
+++ b/xds/dubbo-go-istio/server/api/api_triple.pb.go
@@ -1,4 +1,20 @@
-// Code generated by protoc-gen-go-triple. DO NOT EDIT.
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 // versions:
 // - protoc-gen-go-triple v1.0.8
 // - protoc             v3.17.3
@@ -8,15 +24,20 @@ package api
 
 import (
        context "context"
+       fmt "fmt"
+)
+
+import (
        constant1 "dubbo.apache.org/dubbo-go/v3/common/constant"
        protocol "dubbo.apache.org/dubbo-go/v3/protocol"
        dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
        invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
-       fmt "fmt"
+
        grpc_go "github.com/dubbogo/grpc-go"
        codes "github.com/dubbogo/grpc-go/codes"
        metadata "github.com/dubbogo/grpc-go/metadata"
        status "github.com/dubbogo/grpc-go/status"
+
        common "github.com/dubbogo/triple/pkg/common"
        constant "github.com/dubbogo/triple/pkg/common/constant"
        triple "github.com/dubbogo/triple/pkg/triple"
diff --git a/xds/dubbo-go-istio/server/cmd/app.go 
b/xds/dubbo-go-istio/server/cmd/app.go
index ce6d825..7187634 100644
--- a/xds/dubbo-go-istio/server/cmd/app.go
+++ b/xds/dubbo-go-istio/server/cmd/app.go
@@ -1,7 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package main
 
 import (
        _ "dubbo-go-app/pkg/service"
+
        "dubbo.apache.org/dubbo-go/v3/config"
        _ "dubbo.apache.org/dubbo-go/v3/imports"
 )
diff --git a/xds/dubbo-go-istio/server/pkg/service/dubbo-greeting-service.go 
b/xds/dubbo-go-istio/server/pkg/service/dubbo-greeting-service.go
index d862e62..e0970b1 100644
--- a/xds/dubbo-go-istio/server/pkg/service/dubbo-greeting-service.go
+++ b/xds/dubbo-go-istio/server/pkg/service/dubbo-greeting-service.go
@@ -1,8 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package service
 
 import (
        "context"
+)
+
+import (
        "dubbo.apache.org/dubbo-go/v3/config"
+
        hessian "github.com/apache/dubbo-go-hessian2"
 )
 
diff --git a/xds/dubbo-go-istio/server/pkg/service/service.go 
b/xds/dubbo-go-istio/server/pkg/service/service.go
index 8ac1f75..4a89b78 100644
--- a/xds/dubbo-go-istio/server/pkg/service/service.go
+++ b/xds/dubbo-go-istio/server/pkg/service/service.go
@@ -1,8 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package service
 
 import (
        "context"
+)
+
+import (
        "dubbo-go-app/api"
+
        "dubbo.apache.org/dubbo-go/v3/common/logger"
        "dubbo.apache.org/dubbo-go/v3/config"
 )
diff --git a/xds/filesystem-control-panel/server/main.go 
b/xds/filesystem-control-panel/server/main.go
index 17535be..967cf4a 100644
--- a/xds/filesystem-control-panel/server/main.go
+++ b/xds/filesystem-control-panel/server/main.go
@@ -27,9 +27,6 @@ import (
 )
 
 import (
-       "github.com/dubbo-go-pixiu/pixiu-api/pkg/xds"
-       pixiupb "github.com/dubbo-go-pixiu/pixiu-api/pkg/xds/model"
-
        core "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
        "github.com/envoyproxy/go-control-plane/pkg/cache/types"
        "github.com/envoyproxy/go-control-plane/pkg/cache/v3"
@@ -44,6 +41,11 @@ import (
        "google.golang.org/protobuf/types/known/anypb"
 )
 
+import (
+       "github.com/dubbo-go-pixiu/pixiu-api/pkg/xds"
+       pixiupb "github.com/dubbo-go-pixiu/pixiu-api/pkg/xds/model"
+)
+
 var (
        l       Logger
        port    = uint(18000)
diff --git a/xds/local-control-panel/server/app/resoruce_pixiu2.go 
b/xds/local-control-panel/server/app/resoruce_pixiu2.go
index 4ce4c74..6d76e35 100644
--- a/xds/local-control-panel/server/app/resoruce_pixiu2.go
+++ b/xds/local-control-panel/server/app/resoruce_pixiu2.go
@@ -18,9 +18,6 @@
 package main
 
 import (
-       "github.com/dubbo-go-pixiu/pixiu-api/pkg/xds"
-       pixiupb "github.com/dubbo-go-pixiu/pixiu-api/pkg/xds/model"
-
        core "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
        "github.com/envoyproxy/go-control-plane/pkg/cache/types"
        "github.com/envoyproxy/go-control-plane/pkg/cache/v3"
@@ -29,6 +26,11 @@ import (
        "google.golang.org/protobuf/types/known/anypb"
 )
 
+import (
+       "github.com/dubbo-go-pixiu/pixiu-api/pkg/xds"
+       pixiupb "github.com/dubbo-go-pixiu/pixiu-api/pkg/xds/model"
+)
+
 func makeListeners2() *pixiupb.PixiuExtensionListeners {
        return &pixiupb.PixiuExtensionListeners{Listeners: []*pixiupb.Listener{
                {
diff --git a/xds/local-control-panel/server/app/resource_pixiu.go 
b/xds/local-control-panel/server/app/resource_pixiu.go
index 4f8d0e7..fed564c 100644
--- a/xds/local-control-panel/server/app/resource_pixiu.go
+++ b/xds/local-control-panel/server/app/resource_pixiu.go
@@ -18,8 +18,7 @@
 package main
 
 import (
-       "github.com/dubbo-go-pixiu/pixiu-api/pkg/xds"
-       pixiupb "github.com/dubbo-go-pixiu/pixiu-api/pkg/xds/model"
+       "github.com/apache/dubbo-go-pixiu/pkg/common/constant"
 
        core "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
        "github.com/envoyproxy/go-control-plane/pkg/cache/types"
@@ -32,7 +31,8 @@ import (
 )
 
 import (
-       "github.com/apache/dubbo-go-pixiu/pkg/common/constant"
+       "github.com/dubbo-go-pixiu/pixiu-api/pkg/xds"
+       pixiupb "github.com/dubbo-go-pixiu/pixiu-api/pkg/xds/model"
 )
 
 var httpManagerConfigYaml = `

Reply via email to