From b39cea52b66521baa6df1e7dca9232918a500487 Mon Sep 17 00:00:00 2001 From: Dmitriy Seredenko Date: Fri, 2 Jun 2017 19:24:28 +0200 Subject: [PATCH] edit docs --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 25c82eb..383d7f1 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ + ###Go-Mocket Go-Mocket is library inspired by [DATA-DOG/go-sqlmock](https://github.com/DATA-DOG/go-sqlmock) @@ -17,11 +18,13 @@ List of features in the library: **NOTE** Please be aware that driver catches SQL without DB specifics. Generating of queries is done by *sql* package ####Install + ``` go get github.com/selvatico/go-mocket ``` #### Usage + There are two possible ways to use `mocket`: * Chaining API @@ -30,7 +33,8 @@ There are two possible ways to use `mocket`: ##### Enabling driver Somewhere in you code to setup a tests -``` + +```go import ( "database/sql" mocket "github.com/selvatico/go-mocket" @@ -47,9 +51,11 @@ func SetupTests() { db, err := sql.Open(driver, source) } ``` + Now if use singleton instance of DB it will use everywhere mocked connection. ##### Chain usage + ###### Example of mocking by pattern ```go