diff --git a/v2/libgrn/client.go b/v2/libgrn/client.go index d0ee702..a78a14e 100644 --- a/v2/libgrn/client.go +++ b/v2/libgrn/client.go @@ -29,9 +29,9 @@ type Client struct { idleConns chan *conn } -// DialClient returns a new Client connected to a GQTP server. +// Dial returns a new Client connected to a GQTP server. // The expected address format is [scheme://][host][:port]. -func DialClient(addr string, options *ClientOptions) (*Client, error) { +func Dial(addr string, options *ClientOptions) (*Client, error) { if options == nil { options = NewClientOptions() } @@ -48,8 +48,8 @@ func DialClient(addr string, options *ClientOptions) (*Client, error) { return c, nil } -// OpenClient opens an existing DB and returns a new Client. -func OpenClient(path string, options *ClientOptions) (*Client, error) { +// Open opens an existing DB and returns a new Client. +func Open(path string, options *ClientOptions) (*Client, error) { if options == nil { options = NewClientOptions() } @@ -63,8 +63,8 @@ func OpenClient(path string, options *ClientOptions) (*Client, error) { }, nil } -// CreateClient creates a new DB and returns a new Client. -func CreateClient(path string, options *ClientOptions) (*Client, error) { +// Create creates a new DB and returns a new Client. +func Create(path string, options *ClientOptions) (*Client, error) { if options == nil { options = NewClientOptions() } diff --git a/v2/libgrn/db_test.go b/v2/libgrn/db_test.go index a7893b0..880b6e9 100644 --- a/v2/libgrn/db_test.go +++ b/v2/libgrn/db_test.go @@ -20,12 +20,12 @@ func makeDB(t *testing.T) (db *grnci.DB, dir string) { if err != nil { t.Fatalf("ioutil.TempDir failed: %v", err) } - conn, err := CreateClient(filepath.Join(dir, "db"), nil) + client, err := Create(filepath.Join(dir, "db"), nil) if err != nil { os.RemoveAll(dir) t.Fatalf("Open failed: %v", err) } - return grnci.NewDB(conn), dir + return grnci.NewDB(client), dir } // removeDB removes a temporary DB.