Skip to content

Commit

Permalink
Change documentation to avoid confusion (#17)
Browse files Browse the repository at this point in the history
* clarify call order in readme

* switch to spaces for docs
  • Loading branch information
Squwid authored Apr 5, 2021
1 parent ab89890 commit 809d88b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,15 @@ WithTheme(theme Theme)

```golang
import (
"github.com/go-echarts/statsview"
"github.com/go-echarts/statsview/viewer"
)

// set configurations before calling the `Start()` method
// set configurations before calling `statsview.New()` method
viewer.SetConfiguration(viewer.WithTheme(viewer.ThemeWesteros), viewer.WithAddr("localhost:8087"))

mgr := statsview.New()
go mgr.Start()
```

## 🗂 Viewers
Expand Down

0 comments on commit 809d88b

Please sign in to comment.