mirror of
https://github.com/ent/ent.git
synced 2026-05-22 09:31:45 +03:00
Summary: Pull Request resolved: https://github.com/facebookexternal/fbc/pull/1534 Pull Request resolved: https://github.com/facebookincubator/ent/pull/73 lint errors detected by running `golangci-lint` tool. Reviewed By: a8m Differential Revision: D17784980 fbshipit-source-id: f7e8bd99fdf1e018d5672cea1e8d44b67f2a4201
23 lines
542 B
Cheetah
23 lines
542 B
Cheetah
{{/*
|
|
Copyright 2019-present Facebook Inc. All rights reserved.
|
|
This source code is licensed under the Apache 2.0 license found
|
|
in the LICENSE file in the root directory of this source tree.
|
|
*/}}
|
|
|
|
{{ define "dialect/gremlin/client/open" }}
|
|
u, err := url.Parse(dataSourceName)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
c, err := gremlin.NewClient(gremlin.Config{
|
|
Endpoint: gremlin.Endpoint{
|
|
URL: u,
|
|
},
|
|
})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
drv := gremlin.NewDriver(c)
|
|
return NewClient(append(options, Driver(drv))...), nil
|
|
{{ end }}
|