Skip to content
Snippets Groups Projects
Commit 4c1886fc authored by vito.he's avatar vito.he
Browse files

Add:add license header & format code

parent 4e2382b4
No related branches found
No related tags found
No related merge requests found
Showing
with 128 additions and 9 deletions
......@@ -19,11 +19,14 @@ package config
import (
"container/list"
"github.com/apache/dubbo-go/config_center"
"strings"
"sync"
)
import (
"github.com/apache/dubbo-go/config_center"
)
// There is dubbo.properties file and application level config center configuration which higner than normal config center in java. So in java the
// configuration sequence will be config center > application level config center > dubbo.properties > spring bean configuration.
// But in go, neither the dubbo.properties file or application level config center configuration will not support for the time being.
......
......@@ -19,6 +19,7 @@ package config
import (
"testing"
)
import (
"github.com/stretchr/testify/assert"
)
......
......@@ -21,9 +21,11 @@ import (
"reflect"
"strconv"
)
import (
perrors "github.com/pkg/errors"
)
import (
"github.com/apache/dubbo-go/common"
"github.com/apache/dubbo-go/common/config"
......
......@@ -21,6 +21,7 @@ import (
"regexp"
"strings"
)
import (
"github.com/apache/dubbo-go/common/constant"
)
......
......@@ -22,10 +22,12 @@ import (
"path"
"time"
)
import (
perrors "github.com/pkg/errors"
"gopkg.in/yaml.v2"
)
import (
"github.com/apache/dubbo-go/common/constant"
"github.com/apache/dubbo-go/common/logger"
......
......@@ -19,6 +19,7 @@ package config
import (
"strings"
)
import (
"github.com/apache/dubbo-go/common/constant"
)
......
......@@ -20,11 +20,15 @@ import (
"fmt"
"testing"
)
import (
"github.com/apache/dubbo-go/common"
"github.com/stretchr/testify/assert"
)
import (
"github.com/apache/dubbo-go/common"
)
func Test_loadRegistries(t *testing.T) {
target := "shanghai1"
regs := map[string]*RegistryConfig{
......
/*
* 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 config_center
import (
"fmt"
)
import (
"github.com/apache/dubbo-go/remoting"
)
......
/*
* 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 config_center
import (
......
......@@ -19,9 +19,11 @@ package configurator
import (
"strings"
)
import (
"github.com/dubbogo/gost/container"
)
import (
"github.com/apache/dubbo-go/common"
"github.com/apache/dubbo-go/common/constant"
......
......@@ -20,9 +20,11 @@ import (
"context"
"testing"
)
import (
"github.com/stretchr/testify/assert"
)
import (
"github.com/apache/dubbo-go/common"
"github.com/apache/dubbo-go/common/constant"
......
......@@ -20,6 +20,7 @@ package config_center
import (
"time"
)
import (
"github.com/apache/dubbo-go/config_center/parser"
)
......
......@@ -18,14 +18,18 @@
package config_center
import (
"github.com/apache/dubbo-go/common/constant"
"github.com/apache/dubbo-go/remoting"
"gopkg.in/yaml.v2"
"sync"
)
import (
"gopkg.in/yaml.v2"
)
import (
"github.com/apache/dubbo-go/common"
"github.com/apache/dubbo-go/common/constant"
"github.com/apache/dubbo-go/config_center/parser"
"github.com/apache/dubbo-go/remoting"
)
type MockDynamicConfigurationFactory struct{}
......
/*
* 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 parser
import (
......@@ -5,11 +22,13 @@ import (
"strconv"
"strings"
)
import (
"github.com/magiconair/properties"
perrors "github.com/pkg/errors"
"gopkg.in/yaml.v2"
)
import (
"github.com/apache/dubbo-go/common"
"github.com/apache/dubbo-go/common/constant"
......
/*
* 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 parser
import (
"testing"
)
import (
"github.com/stretchr/testify/assert"
)
......
......@@ -18,13 +18,14 @@
package zookeeper
import (
"github.com/apache/dubbo-go/config_center/parser"
"sync"
)
import (
"github.com/apache/dubbo-go/common"
"github.com/apache/dubbo-go/common/extension"
"github.com/apache/dubbo-go/config_center"
"github.com/apache/dubbo-go/config_center/parser"
)
func init() {
......
......@@ -18,20 +18,22 @@
package zookeeper
import (
"github.com/apache/dubbo-go/config_center/parser"
"strings"
"sync"
"time"
)
import (
perrors "github.com/pkg/errors"
"github.com/samuel/go-zookeeper/zk"
)
import (
"github.com/apache/dubbo-go/common"
"github.com/apache/dubbo-go/common/constant"
"github.com/apache/dubbo-go/common/logger"
"github.com/apache/dubbo-go/config_center"
"github.com/apache/dubbo-go/config_center/parser"
"github.com/apache/dubbo-go/remoting/zookeeper"
)
......
......@@ -21,6 +21,7 @@ import (
"strings"
"sync"
)
import (
"github.com/apache/dubbo-go/config_center"
"github.com/apache/dubbo-go/remoting"
......
/*
* 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 registry
import (
......
......@@ -18,13 +18,16 @@
package registry
import (
"github.com/apache/dubbo-go/common/logger"
"go.uber.org/atomic"
"time"
)
import (
"go.uber.org/atomic"
)
import (
"github.com/apache/dubbo-go/common"
"github.com/apache/dubbo-go/common/logger"
)
type MockRegistry struct {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment