From 56bb4952535c802e18c20a1bd07e9285b889ee02 Mon Sep 17 00:00:00 2001 From: Pawan Rawal <pawan@dgraph.io> Date: Thu, 30 Jun 2016 18:31:27 +0530 Subject: [PATCH] Delete Go client example --- client/dgraphclient-go/.gitignore | 1 - client/dgraphclient-go/main.go | 53 ------------------------------- 2 files changed, 54 deletions(-) delete mode 100644 client/dgraphclient-go/.gitignore delete mode 100644 client/dgraphclient-go/main.go diff --git a/client/dgraphclient-go/.gitignore b/client/dgraphclient-go/.gitignore deleted file mode 100644 index 6f30a3ab..00000000 --- a/client/dgraphclient-go/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/example diff --git a/client/dgraphclient-go/main.go b/client/dgraphclient-go/main.go deleted file mode 100644 index afebf93a..00000000 --- a/client/dgraphclient-go/main.go +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2016 DGraph Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package main - -import ( - "flag" - "fmt" - - "golang.org/x/net/context" - "google.golang.org/grpc" - - "github.com/dgraph-io/dgraph/query/graph" - "github.com/dgraph-io/dgraph/x" -) - -var glog = x.Log("client") -var ip = flag.String("ip", "127.0.0.1:8081", "Port to communicate with server") -var q = flag.String("query", "", "Query sent to the server") - -func main() { - flag.Parse() - // TODO(pawan): Pick address for server from config - conn, err := grpc.Dial(*ip, grpc.WithInsecure()) - if err != nil { - x.Err(glog, err).Fatal("DialTCPConnection") - } - defer conn.Close() - - c := graph.NewDgraphClient(conn) - - resp, err := c.Query(context.Background(), &graph.Request{Query: *q}) - if err != nil { - x.Err(glog, err).Fatal("Error in getting response from server") - } - - // TODO(pawan): Remove this later - fmt.Printf("Subgraph %+v", resp.N) - -} -- GitLab