From 809d88bf88c120ddd94719b94099ade58fb60faf Mon Sep 17 00:00:00 2001 From: Benjamin Whitelaw Date: Sun, 4 Apr 2021 22:45:58 -0400 Subject: [PATCH] Change documentation to avoid confusion (#17) * clarify call order in readme * switch to spaces for docs --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2fbb819..a1afa95 100644 --- a/README.md +++ b/README.md @@ -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