Remove unreachable panics (Go 1.1 doesn't need them)
This commit is contained in:
@@ -101,8 +101,6 @@ func Connect(parameters ConnectionParameters) (c *Connection, err error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
panic("Unreachable")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Connection) Close() (err error) {
|
func (c *Connection) Close() (err error) {
|
||||||
@@ -143,8 +141,6 @@ func (c *Connection) SelectFunc(sql string, onDataRow func(*DataRowReader) error
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
panic("Unreachable")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Connection) SelectRows(sql string, arguments ...interface{}) (rows []map[string]interface{}, err error) {
|
func (c *Connection) SelectRows(sql string, arguments ...interface{}) (rows []map[string]interface{}, err error) {
|
||||||
@@ -255,8 +251,6 @@ func (c *Connection) Execute(sql string, arguments ...interface{}) (commandTag s
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
panic("Unreachable")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Processes messages that are not exclusive to one context such as
|
// Processes messages that are not exclusive to one context such as
|
||||||
@@ -274,9 +268,6 @@ func (c *Connection) processContextFreeMsg(t byte, r *MessageReader) (err error)
|
|||||||
default:
|
default:
|
||||||
return fmt.Errorf("Received unknown message type: %c", t)
|
return fmt.Errorf("Received unknown message type: %c", t)
|
||||||
}
|
}
|
||||||
|
|
||||||
panic("Unreachable")
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Connection) rxMsg() (t byte, r *MessageReader, err error) {
|
func (c *Connection) rxMsg() (t byte, r *MessageReader, err error) {
|
||||||
@@ -360,8 +351,6 @@ func (c *Connection) rxErrorResponse(r *MessageReader) (err PgError) {
|
|||||||
r.ReadString()
|
r.ReadString()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
panic("Unreachable")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Connection) rxBackendKeyData(r *MessageReader) {
|
func (c *Connection) rxBackendKeyData(r *MessageReader) {
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ func (c *Connection) SanitizeSql(sql string, args ...interface{}) (output string
|
|||||||
default:
|
default:
|
||||||
panic("Unable to sanitize type: " + reflect.TypeOf(arg).String())
|
panic("Unable to sanitize type: " + reflect.TypeOf(arg).String())
|
||||||
}
|
}
|
||||||
panic("Unreachable")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
output = literalPattern.ReplaceAllStringFunc(sql, replacer)
|
output = literalPattern.ReplaceAllStringFunc(sql, replacer)
|
||||||
|
|||||||
Reference in New Issue
Block a user