go-echarts / statsview

🚀 A real-time Golang runtime stats visualization profiler
MIT License
573 stars 53 forks source link

Change documentation to avoid confusion #17

Closed Squwid closed 3 years ago

Squwid commented 3 years ago

After debugging for about an hour, i found that i was calling

mgr := statsview.New()
viewer.setConfiguration(viewer.WithAddr("192.168.1.2:18066"))
go mgr.Start()

which created unexpected results, example a log message on statsview.go#36

func (vm *ViewManager) Start() error {
    fmt.Printf("Server Addr: %s Expected: %v\n", vm.srv.Addr, viewer.Addr()) // Server Addr: localhost:18066 Expected: 192.168.1.2:18066
    return vm.srv.ListenAndServe()
}

I want to make sure that the documentation is extremely clear in which the order of the configuration is called.