Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
22a7f0099
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2022
22a7f0099
Commits
7e7dfdb7
Commit
7e7dfdb7
authored
5 years ago
by
fangyincheng
Browse files
Options
Downloads
Patches
Plain Diff
Mod: rename file name
parent
639ddeff
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
common/extension/config_reader.go
+4
-4
4 additions, 4 deletions
common/extension/config_reader.go
config/config_loader.go
+2
-2
2 additions, 2 deletions
config/config_loader.go
protocol/rest/config/reader/rest_config_reader.go
+1
-1
1 addition, 1 deletion
protocol/rest/config/reader/rest_config_reader.go
with
7 additions
and
7 deletions
common/extension/confi
t
_reader.go
→
common/extension/confi
g
_reader.go
+
4
−
4
View file @
7e7dfdb7
...
...
@@ -39,12 +39,12 @@ func GetConfigReaders(name string) interfaces.ConfigReader {
return
configReaders
[
name
]()
}
// SetDefaultConfi
t
Reader set {name} to default config reader for {module}
func
SetDefaultConfi
t
Reader
(
module
,
name
string
)
{
// SetDefaultConfi
g
Reader set {name} to default config reader for {module}
func
SetDefaultConfi
g
Reader
(
module
,
name
string
)
{
defaults
[
module
]
=
name
}
// GetDefaultConfi
t
Reader
func
GetDefaultConfi
t
Reader
()
map
[
string
]
string
{
// GetDefaultConfi
g
Reader
func
GetDefaultConfi
g
Reader
()
map
[
string
]
string
{
return
defaults
}
This diff is collapsed.
Click to expand it.
config/config_loader.go
+
2
−
2
View file @
7e7dfdb7
...
...
@@ -97,7 +97,7 @@ func Load() {
}
else
{
// init other consumer config
conConfigType
:=
consumerConfig
.
ConfigType
for
key
,
value
:=
range
extension
.
GetDefaultConfi
t
Reader
()
{
for
key
,
value
:=
range
extension
.
GetDefaultConfi
g
Reader
()
{
if
conConfigType
==
nil
{
if
v
,
ok
:=
conConfigType
[
key
];
ok
{
value
=
v
...
...
@@ -170,7 +170,7 @@ func Load() {
}
else
{
// init other provider config
proConfigType
:=
providerConfig
.
ConfigType
for
key
,
value
:=
range
extension
.
GetDefaultConfi
t
Reader
()
{
for
key
,
value
:=
range
extension
.
GetDefaultConfi
g
Reader
()
{
if
proConfigType
!=
nil
{
if
v
,
ok
:=
proConfigType
[
key
];
ok
{
value
=
v
...
...
This diff is collapsed.
Click to expand it.
protocol/rest/config/reader/rest_config_reader.go
+
1
−
1
View file @
7e7dfdb7
...
...
@@ -40,7 +40,7 @@ const REST = "rest"
func
init
()
{
extension
.
SetConfigReaders
(
REST
,
NewRestConfigReader
)
extension
.
SetDefaultConfi
t
Reader
(
REST
,
REST
)
extension
.
SetDefaultConfi
g
Reader
(
REST
,
REST
)
}
type
RestConfigReader
struct
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment