Use db.Ping to test connection

This commit is contained in:
Dan Sosedoff
2014-10-11 22:38:32 -05:00
parent ba74d8193c
commit 7d7e67a54e
2 changed files with 11 additions and 8 deletions

View File

@@ -39,6 +39,10 @@ func NewClient() (*Client, error) {
return &Client{db: db}, nil
}
func (client *Client) Test() error {
return client.db.Ping()
}
func (client *Client) recordQuery(query string) {
client.history = append(client.history, query)
}