<commit_before>---
layout: docs
title: Go Quick Start
---

<h1 class="page-header">gRPC in 3 minutes (Go)</h1>

<p class="lead">This document will get you started with gRPC in Go, including a quick example.</p>

Prerequisites
-------------

- gRPC requires Go 1.4
- It also requires that [GOPATH is set](https://golang.org/doc/code.html#GOPATH)

```sh
$ go help gopath
$ # ensure the PATH contains $GOPATH/bin
$ export PATH=$PATH:$GOPATH/bin
```

Install
-------

-  First [install protoc](https://github.com/google/protobuf/blob/master/INSTALL.txt).
  - For now, this needs to be installed from source
  - This is will change once proto3 is officially released

- Install the protoc Go plugin.

```sh
$ go get -a github.com/golang/protobuf/protoc-gen-go
```

- Get the example.

```sh
$ go get -u github.com/grpc/grpc-go/examples/helloworld/greeter_client
$ go get -u github.com/grpc/grpc-go/examples/helloworld/greeter_server
```

Try it!
-------

For this sample, we've already generated the server and client stubs from [helloworld.proto](https://github.com/grpc/grpc-go/blob/master/examples/helloworld/helloworld/helloworld.proto). 

- Run the server
```sh
$ greeter_server &
```

- Run the client
```sh
$ greeter_client
```
<commit_msg>Fixed path for getting go sample code<commit_after>---
layout: docs
title: Go Quick Start
---

<h1 class="page-header">gRPC in 3 minutes (Go)</h1>

<p class="lead">This document will get you started with gRPC in Go, including a quick example.</p>

Prerequisites
-------------

- gRPC requires Go 1.4
- It also requires that [GOPATH is set](https://golang.org/doc/code.html#GOPATH)

```sh
$ go help gopath
$ # ensure the PATH contains $GOPATH/bin
$ export PATH=$PATH:$GOPATH/bin
```

Install
-------

-  First [install protoc](https://github.com/google/protobuf/blob/master/INSTALL.txt).
  - For now, this needs to be installed from source
  - This is will change once proto3 is officially released

- Install the protoc Go plugin.

```sh
$ go get -a github.com/golang/protobuf/protoc-gen-go
```

- Get the example.

```sh
$ go get -u google.golang.org/grpc/examples/helloworld/greeter_client
$ go get -u google.golang.org/grpc/examples/helloworld/greeter_server
```

Try it!
-------

For this sample, we've already generated the server and client stubs from [helloworld.proto](https://github.com/grpc/grpc-go/blob/master/examples/helloworld/helloworld/helloworld.proto). 

- Run the server
```sh
$ greeter_server &
```

- Run the client
```sh
$ greeter_client
```

{'fraction_non_alphanumeric': 0.1524341580207502, 'fraction_numerical': 0.004788507581803671, 'mean_word_length': 3.5334538878842676, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4114201', 'n_tokens_mistral': 891, 'n_tokens_neox': 836, 'n_words': 246}