pruepei / influx-proxy

Other
6 stars 4 forks source link

关于函数命名问题 #12

Open Sn0rt opened 7 years ago

Sn0rt commented 7 years ago
$ grep -rin LoadJson .
Binary file ./bin/influx-proxy matches
./service/main.go:45:func LoadJson(configfile string, cfg interface{}) (err error) {
./service/main.go:81:   err = LoadJson(ConfigFile, &cfg)

如上所示LoadJson函数仅在初始化过程中使用,不建议使用go的导出函数命名风格。

Sn0rt commented 7 years ago

14 尝试修正

Sn0rt commented 7 years ago
$ grep -rin HandlerReload .
Binary file ./bin/influx-proxy matches
./service/http.go:35:   mux.HandleFunc("/reload", hs.HandlerReload)
./service/http.go:43:func (hs *HttpService) HandlerReload(w http.ResponseWriter, req *http.Request) {

同理 @moooofly 怎么看?

Sn0rt commented 7 years ago
$ grep -rin RewriteLoop .
./backends.go:199:      go bs.RewriteLoop()
./backends.go:205:func (bs *Backends) RewriteLoop() {