Skip to content

Commit a221648

Browse files
committed
chore: update according to steinliber's review
Signed-off-by: Bird <aflybird0@gmail.com>
1 parent 6632eec commit a221648

3 files changed

Lines changed: 4 additions & 11 deletions

File tree

internal/pkg/configmanager/rawconfig.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import (
77
"unicode"
88

99
"gopkg.in/yaml.v3"
10-
11-
"github.com/devstream-io/devstream/pkg/util/log"
1210
)
1311

1412
// rawConfig respent every valid config block for devstream
@@ -138,7 +136,6 @@ func (c *rawConfig) getTemplatePipelineMap() (map[string]string, error) {
138136
if _, ok := pipelineTemplateMap[t.Name]; ok {
139137
return nil, fmt.Errorf("pipelineTemplate <%s> is duplicated", t.Name)
140138
}
141-
log.Infof("pipelineTemplate %s is loaded", t.Name)
142139
pipelineTemplateMap[t.Name] = string(rawPipeline)
143140
}
144141
return pipelineTemplateMap, nil

internal/pkg/configmanager/tool.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func (tools Tools) validate() (errs []error) {
6666
for _, tool := range tools {
6767
errs = append(errs, tool.validate()...)
6868
}
69-
errs = append(errs, tools.DuplicatedCheck()...)
69+
errs = append(errs, tools.duplicatedCheck()...)
7070
return
7171
}
7272

@@ -117,11 +117,7 @@ func (t *Tool) GetPluginMD5FileNameWithOSAndArch(os, arch string) string {
117117
return t.GetPluginNameWithOSAndArch(os, arch) + ".md5"
118118
}
119119

120-
func (t *Tool) EqualNameAndInstanceID(other *Tool) bool {
121-
return t.Name == other.Name && t.InstanceID == other.InstanceID
122-
}
123-
124-
func (tools Tools) DuplicatedCheck() (errs []error) {
120+
func (tools Tools) duplicatedCheck() (errs []error) {
125121
list := make(map[string]struct{})
126122
for _, t := range tools {
127123
key := t.KeyWithNameAndInstanceID()

internal/pkg/configmanager/tool_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ var _ = Describe("Tool struct", func() {
166166
})
167167
})
168168

169-
var _ = Describe("DuplicatedCheck", func() {
169+
var _ = Describe("duplicatedCheck", func() {
170170
var (
171171
errs []error
172172
tools Tools
@@ -184,7 +184,7 @@ var _ = Describe("DuplicatedCheck", func() {
184184
)
185185

186186
JustBeforeEach(func() {
187-
errs = tools.DuplicatedCheck()
187+
errs = tools.duplicatedCheck()
188188
})
189189

190190
When("tools has duplicated name and instanceID", func() {

0 commit comments

Comments
 (0)