childe / gohangout

使用 golang 模仿的 Logstash。用于消费 Kafka 数据,处理后写入 ES、Clickhouse 等。
MIT License
1.01k stars 234 forks source link

refactor: replace exit chan with context #224

Closed ColinChamber closed 1 year ago

ColinChamber commented 1 year ago

I saw your TODO mark. Would it be better to use context? @childe

childe commented 1 year ago

Thanks. could you help format the code and push a new commit ? I will squash and merge them

ColinChamber commented 1 year ago
$ golangci-lint run gohangout.go
gohangout.go:161:23: Error return value of `http.ListenAndServe` is not checked (errcheck)
                        http.ListenAndServe(options.prometheus, nil)
                                           ^
gohangout.go:167:23: Error return value of `http.ListenAndServe` is not checked (errcheck)
                        http.ListenAndServe(options.pprofAddr, nil)
$ golangci-lint run input/input_box.go 

It has no issues when checking with golangci-lint. Could you tell me how to find the line that needs to be formatted?

childe commented 1 year ago
$ golangci-lint run gohangout.go
gohangout.go:161:23: Error return value of `http.ListenAndServe` is not checked (errcheck)
                        http.ListenAndServe(options.prometheus, nil)
                                           ^
gohangout.go:167:23: Error return value of `http.ListenAndServe` is not checked (errcheck)
                        http.ListenAndServe(options.pprofAddr, nil)
$ golangci-lint run input/input_box.go 

It has no issues when checking with golangci-lint. Could you tell me how to find the line that needs to be formatted?

gofmt --help