summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorBen Burwell <ben@benburwell.com>2019-09-23 14:26:34 -0400
committerBen Burwell <ben@benburwell.com>2019-09-23 14:26:34 -0400
commitf312016e0b70f38b48e509472680bbf6cde64179 (patch)
tree086fa9961c091dae5fb00d684965d47db8ce1d9a /client
parent5d3f80f17a10fcfd6b5fd4fb4a2d42afaf7dc789 (diff)
Simplify
Diffstat (limited to 'client')
-rw-r--r--client/client_test.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/client/client_test.go b/client/client_test.go
index b6af2b9..a724857 100644
--- a/client/client_test.go
+++ b/client/client_test.go
@@ -9,13 +9,12 @@ import (
)
func TestEncode(t *testing.T) {
- var hf http.HandlerFunc = func(w http.ResponseWriter, r *http.Request) {
+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("response"))
- }
- server := httptest.NewServer(hf)
+ }))
defer server.Close()
- c := CaesarClient{Endpoint: server.URL} // HL
- r, err := c.EncodeMessage(strings.NewReader("secret message"))
+ client := CaesarClient{Endpoint: server.URL} // HL
+ r, err := client.EncodeMessage(strings.NewReader("secret message"))
if err != nil {
t.Errorf("should not have gotten error: %v", err)
}