From 6b76a30c04cb74dd9a759789f75bba2eea86a1fb Mon Sep 17 00:00:00 2001 From: Mikhail Osipov Date: Wed, 16 Dec 2020 18:03:08 +0300 Subject: add defer test --- pkg/test/test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'pkg/test/test.go') diff --git a/pkg/test/test.go b/pkg/test/test.go index 89722fd..44289c9 100644 --- a/pkg/test/test.go +++ b/pkg/test/test.go @@ -14,6 +14,8 @@ import ( "tunnel/pkg/server" ) +const xData = "Hello, World!" + type env struct { *testing.T } @@ -69,6 +71,14 @@ func (c *Client) Send(format string, args ...interface{}) string { return r } +func (c *Client) Get(name string) string { + return c.Send("get %s", name) +} + +func (c *Client) Set(name string, value interface{}) { + c.Exec("set %s %s", name, value) +} + func (c *Client) Exec(format string, args ...interface{}) { s := c.Send(format, args...) if s != "" { -- cgit v1.2.3-70-g09d2