From dd26ad0091a21a1b58b00a89a8e10d1bbcf7329b Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Sat, 14 Nov 2015 14:14:52 -0600 Subject: [PATCH] Remove unreachable code --- conn.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/conn.go b/conn.go index ebb1bcb7..5bfb1813 100644 --- a/conn.go +++ b/conn.go @@ -927,11 +927,7 @@ func (c *Conn) sendPreparedQuery(ps *PreparedStatement, arguments ...interface{} case JsonOid, JsonbOid: err = encodeJson(wbuf, arguments[i]) default: - if s, ok := arguments[i].(string); ok { - err = encodeText(wbuf, s) - } else { - return SerializationError(fmt.Sprintf("Cannot encode %T into oid %v - %T must implement Encoder or be converted to a string", arg, oid, arg)) - } + return SerializationError(fmt.Sprintf("Cannot encode %T into oid %v - %T must implement Encoder or be converted to a string", arg, oid, arg)) } } if err != nil {