aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-06-19 17:25:14 +0200
committerDmitry Vyukov <dvyukov@google.com>2017-06-20 19:52:50 +0200
commit653ec8a64a80efcad9117609160cfababdf1e384 (patch)
treebd9a222db783bbd50394b0f9d2651b2f92dbfb3f /dashboard
parent7a3201d2adf89512d05e6a48b80a46daf6ab1bea (diff)
dashboard: add New function
Diffstat (limited to 'dashboard')
-rw-r--r--dashboard/dash.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/dashboard/dash.go b/dashboard/dash.go
index 2ac8c1439..ccc23fed2 100644
--- a/dashboard/dash.go
+++ b/dashboard/dash.go
@@ -41,6 +41,15 @@ type Patch struct {
Diff []byte
}
+func New(client, addr, key string) (*Dashboard, error) {
+ dash := &Dashboard{
+ Client: client,
+ Addr: addr,
+ Key: key,
+ }
+ return dash, nil
+}
+
func (dash *Dashboard) ReportCrash(crash *Crash) error {
return dash.query("add_crash", crash, nil)
}