From 9ee5ef7a2c0d9779e4e0ffb6ea39fd154af06adc Mon Sep 17 00:00:00 2001 From: Ian Cottrell Date: Mon, 6 Apr 2020 22:41:04 -0400 Subject: [PATCH] internal/jsonrpc2: remove Direction It is no longer used after the changes to the logging system. Change-Id: I7b96fb8297eb66f2ebad67c74c82fa7ed96c3139 Reviewed-on: https://go-review.googlesource.com/c/tools/+/227485 Run-TryBot: Ian Cottrell TryBot-Result: Gobot Gobot Reviewed-by: Robert Findley --- internal/jsonrpc2/handler.go | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/internal/jsonrpc2/handler.go b/internal/jsonrpc2/handler.go index 1382b5ebed..a61122b840 100644 --- a/internal/jsonrpc2/handler.go +++ b/internal/jsonrpc2/handler.go @@ -18,28 +18,6 @@ import ( // The handler should return ErrNotHandled if it could not handle the request. type Handler func(context.Context, *Request) error -// Direction is used to indicate to a logger whether the logged message was being -// sent or received. -type Direction bool - -const ( - // Send indicates the message is outgoing. - Send = Direction(true) - // Receive indicates the message is incoming. - Receive = Direction(false) -) - -func (d Direction) String() string { - switch d { - case Send: - return "send" - case Receive: - return "receive" - default: - panic("unreachable") - } -} - // MethodNotFound is a Handler that replies to all call requests with the // standard method not found response. // This should normally be the final handler in a chain.