[fix]code

This commit is contained in:
Maze.tsz
2021-12-02 03:39:37 +08:00
parent c7b257b188
commit 0431969a73
14 changed files with 798 additions and 17 deletions

View File

@@ -26,7 +26,7 @@ type fetcher struct {
done chan struct{}
hash [16]byte
parser parser
onUpdate func(interface{})
onUpdate func(interface{}) error
}
func (f *fetcher) Name() string {
@@ -167,7 +167,7 @@ func safeWrite(path string, buf []byte) error {
return os.WriteFile(path, buf, fileMode)
}
func newFetcher(name string, interval time.Duration, vehicle types.Vehicle, parser parser, onUpdate func(interface{})) *fetcher {
func newFetcher(name string, interval time.Duration, vehicle types.Vehicle, parser parser, onUpdate func(interface{}) error) *fetcher {
var ticker *time.Ticker
if interval != 0 {
ticker = time.NewTicker(interval)