Skip to content

Commit da52a53

Browse files
committed
update scrape
1 parent 61cdc90 commit da52a53

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scrape.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type IScrape interface {
1919
Find(name string) (e error)
2020
Clear()
2121
Range(rangeFunc RangeFunc) error
22-
OutputCallback(f func(key string, content Content) *OutputInfo) []*OutputInfo
22+
OutputCallback(f func(key string, content Content) *OutputInfo) []OutputInfo
2323
Output() error
2424
}
2525

@@ -161,8 +161,8 @@ func (impl *scrapeImpl) Output() error {
161161
})
162162
}
163163

164-
func (impl scrapeImpl) OutputCallback(f func(key string, content Content) *OutputInfo) []*OutputInfo {
165-
var result []*OutputInfo
164+
func (impl scrapeImpl) OutputCallback(f func(key string, content Content) *OutputInfo) []OutputInfo {
165+
var result []OutputInfo
166166
impl.Range(func(key string, content Content) error {
167167
option := f(key, content)
168168
if option == nil {
@@ -173,7 +173,7 @@ func (impl scrapeImpl) OutputCallback(f func(key string, content Content) *Outpu
173173
}
174174
err := copyFileWithInfo(impl.Cache(), content, option)
175175
if err == nil && !option.Skip {
176-
result = append(result, option)
176+
result = append(result, *option)
177177
}
178178
return err
179179
})

0 commit comments

Comments
 (0)