Skip to content

Commit

Permalink
update other references to all point to new org; update deps to new i…
Browse files Browse the repository at this point in the history
…mport path
  • Loading branch information
jhump committed Jul 26, 2023
1 parent 88c8c60 commit b1936bd
Show file tree
Hide file tree
Showing 12 changed files with 81 additions and 77 deletions.
22 changes: 11 additions & 11 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Contributing
============

We'd love your help making `connect-demo` better!
We'd love your help making `examples-go` better!

If you'd like to add new exported APIs, please [open an issue][open-issue]
describing your proposal — discussing API changes ahead of time makes
pull request review much smoother. In your issue, pull request, and any other
communications, please remember to treat your fellow contributors with
respect!

Note that you'll need to sign [Buf's Contributor License Agreement][cla]
Note that you'll need to sign the [Contributor License Agreement][cla]
before we can accept any of your contributions. If necessary, a bot will remind
you to accept the CLA when you open your pull request.

Expand All @@ -18,11 +18,11 @@ you to accept the CLA when you open your pull request.
[Fork][fork], then clone the repository:

```
mkdir -p $GOPATH/src/github.com/bufbuild
cd $GOPATH/src/github.com/bufbuild
git clone [email protected]:your_github_username/connect-demo.git
cd connect-demo
git remote add upstream https://github.com/bufbuild/connect-demo.git
mkdir -p $GOPATH/src/github.com/connectrpc
cd $GOPATH/src/github.com/connectrpc
git clone [email protected]:your_github_username/examples-go.git examples-go
cd examples-go
git remote add upstream https://github.com/connectrpc/examples-go.git
git fetch upstream
```

Expand All @@ -38,7 +38,7 @@ make
Start by creating a new branch for your changes:

```
cd $GOPATH/src/github.com/bufbuild/connect-demo
cd $GOPATH/src/github.com/connectrpc/examples-go
git checkout main
git fetch upstream
git rebase upstream/main
Expand Down Expand Up @@ -67,7 +67,7 @@ We're much more likely to approve your changes if you:
* Write a [good commit message][commit-message].
* Maintain backward compatibility.

[fork]: https://github.com/bufbuild/connect-demo/fork
[open-issue]: https://github.com/bufbuild/connect-demo/issues/new
[cla]: https://cla-assistant.io/bufbuild/connect-demo
[fork]: https://github.com/connectrpc/examples-go/fork
[open-issue]: https://github.com/connectrpc/examples-go/issues/new
[cla]: https://cla-assistant.io/connectrpc/connect-demo
[commit-message]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ linters-settings:
exhaustruct:
include:
# No zero values for param structs.
- 'github\.com/bufbuild/connect-demo\..*[pP]arams'
- 'connect-examples-go\..*[pP]arams'
forbidigo:
forbid:
# Unlike most Buf projects, we're allowing the standard library's log
Expand All @@ -19,7 +19,7 @@ linters-settings:
sections:
- standard # Standard section: captures all standard packages.
- default # Default section: contains all imports that could not be matched to another section type.
- prefix(connect-go-examples) # Custom section: groups all imports with the specified Prefix.
- prefix(examples-go) # Custom section: groups all imports with the specified Prefix.
godox:
# TODO, OPT, etc. comments are fine to commit. Use FIXME comments for
# temporary hacks, and use godox to prevent committing them.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ $(BIN)/protoc-gen-go: Makefile

$(BIN)/protoc-gen-connect-go: Makefile go.mod
@mkdir -p $(@D)
GOBIN=$(abspath $(@D)) $(GO) install github.com/bufbuild/connect-go/cmd/protoc-gen-connect-go
GOBIN=$(abspath $(@D)) $(GO) install connectrpc.com/connect/cmd/protoc-gen-connect-go
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
connect-demo
============

[![Build](https://github.com/bufbuild/connect-demo/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/bufbuild/connect-demo/actions/workflows/ci.yaml)
[![Report Card](https://goreportcard.com/badge/github.com/bufbuild/connect-demo)](https://goreportcard.com/report/github.com/bufbuild/connect-demo)
[![Build](https://github.com/connectrpc/examples-go/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/connectrpc/examples-go/actions/workflows/ci.yaml)
[![Report Card](https://goreportcard.com/badge/github.com/connectrpc/examples-go)](https://goreportcard.com/report/github.com/connectrpc/examples-go)

`connect-demo` is an example RPC service built with [`connect-go`][connect-go].
`examples-go` contains an example RPC service built with [Connect][connect].
Its API is defined by a [Protocol Buffer schema][schema], and the service
supports the [gRPC][grpc-protocol], [gRPC-Web][grpcweb-protocol], and [Connect
protocols][connect-protocol].
Expand All @@ -16,25 +16,25 @@ was a demonstration of the superficiality of human-computer communication, the
therapy is not very convincing.

For more on Connect, see the [announcement blog post][blog], the documentation
on [connect.build][docs], or the [`connect-go`][connect-go] repo.
on [connectrpc.com][docs], or the [Connect][connect] repo.

## Example

The service is running on https://demo.connect.build. To make an RPC with cURL,
The service is running on https://demo.connectrpc.com. To make an RPC with cURL,
using the Connect protocol:

```bash
curl --header "Content-Type: application/json" \
--data '{"sentence": "I feel happy."}' \
https://demo.connect.build/buf.connect.demo.eliza.v1.ElizaService/Say
https://demo.connectrpc.com/buf.connect.demo.eliza.v1.ElizaService/Say
```

To make the same RPC, but using [`grpcurl`][grpcurl] and the gRPC protocol:

```bash
grpcurl \
-d '{"sentence": "I feel happy."}' \
demo.connect.build:443 \
demo.connectrpc.com:443 \
buf.connect.demo.eliza.v1.ElizaService/Say
```

Expand All @@ -43,12 +43,12 @@ grpcurl \
Offered under the [Apache 2 license][license].

[blog]: https://buf.build/blog/connect-a-better-grpc
[connect-go]: https://github.com/bufbuild/connect-go
[connect]: https://github.com/connectrpc/connect-go
[connect-protocol]: https://connect.build/docs/protocol
[docs]: https://connect.build
[docs]: https://connectrpc.com
[eliza]: https://en.wikipedia.org/wiki/ELIZA
[grpc-protocol]: https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md
[grpcurl]: https://github.com/fullstorydev/grpcurl
[grpcweb-protocol]: https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-WEB.md
[license]: https://github.com/bufbuild/connect-demo/blob/main/LICENSE.txt
[schema]: https://github.com/bufbuild/connect-demo/blob/main/proto/buf/connect/demo/eliza/v1/eliza.proto
[license]: https://github.com/connectrpc/examples-go/blob/main/LICENSE.txt
[schema]: https://github.com/connectrpc/examples-go/blob/main/proto/buf/connect/demo/eliza/v1/eliza.proto
2 changes: 1 addition & 1 deletion buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: v1
managed:
enabled: true
go_package_prefix:
default: connect-go-examples/internal/gen
default: connect-examples-go/internal/gen
plugins:
- name: go
out: internal/gen
Expand Down
13 changes: 6 additions & 7 deletions cmd/demoserver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,16 @@ import (
"syscall"
"time"

"github.com/bufbuild/connect-go"
grpchealth "github.com/bufbuild/connect-grpchealth-go"
grpcreflect "github.com/bufbuild/connect-grpcreflect-go"
"connect-examples-go/internal/eliza"
elizav1 "connect-examples-go/internal/gen/buf/connect/demo/eliza/v1"
"connect-examples-go/internal/gen/buf/connect/demo/eliza/v1/elizav1connect"
"connectrpc.com/connect"
"connectrpc.com/grpchealth"
"connectrpc.com/grpcreflect"
"github.com/rs/cors"
"github.com/spf13/pflag"
"golang.org/x/net/http2"
"golang.org/x/net/http2/h2c"

"connect-go-examples/internal/eliza"
elizav1 "connect-go-examples/internal/gen/buf/connect/demo/eliza/v1"
"connect-go-examples/internal/gen/buf/connect/demo/eliza/v1/elizav1connect"
)

type elizaServer struct {
Expand Down
7 changes: 3 additions & 4 deletions cmd/demoserver/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,11 @@ import (
"sync"
"testing"

"github.com/bufbuild/connect-go"
elizav1 "connect-examples-go/internal/gen/buf/connect/demo/eliza/v1"
"connect-examples-go/internal/gen/buf/connect/demo/eliza/v1/elizav1connect"
"connectrpc.com/connect"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

elizav1 "connect-go-examples/internal/gen/buf/connect/demo/eliza/v1"
"connect-go-examples/internal/gen/buf/connect/demo/eliza/v1/elizav1connect"
)

func TestElizaServer(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// NB: This module name is intentionally not "go get"-able or "go install"-able.
// Users should clone the repo to explore the examples.
module connect-go-examples
module connect-examples-go

go 1.18

require (
github.com/bufbuild/connect-go v1.9.0
github.com/bufbuild/connect-grpchealth-go v1.1.1
github.com/bufbuild/connect-grpcreflect-go v1.1.0
connectrpc.com/connect v1.11.0
connectrpc.com/grpchealth v1.2.0
connectrpc.com/grpcreflect v1.2.0
github.com/rs/cors v1.9.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.4
Expand Down
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
connectrpc.com/connect v1.11.0 h1:Av2KQXxSaX4vjqhf5Cl01SX4dqYADQ38eBtr84JSUBk=
connectrpc.com/connect v1.11.0/go.mod h1:3AGaO6RRGMx5IKFfqbe3hvK1NqLosFNP2BxDYTPmNPo=
connectrpc.com/grpchealth v1.2.0 h1:aHP33Bki+F2jPNI1mFVSFG7v0qJrgmfbg7X7nOdSj0M=
connectrpc.com/grpchealth v1.2.0/go.mod h1:fZos12C4p/ZaZC6OwBGZUM+i/fhnRhv75ax/6V/zIeM=
connectrpc.com/grpcreflect v1.2.0 h1:Q6og1S7HinmtbEuBvARLNwYmTbhEGRpHDhqrPNlmK+U=
connectrpc.com/grpcreflect v1.2.0/go.mod h1:nwSOKmE8nU5u/CidgHtPYk1PFI3U9ignz7iDMxOYkSY=
github.com/bufbuild/connect-go v1.9.0 h1:JIgAeNuFpo+SUPfU19Yt5TcWlznsN5Bv10/gI/6Pjoc=
github.com/bufbuild/connect-go v1.9.0/go.mod h1:CAIePUgkDR5pAFaylSMtNK45ANQjp9JvpluG20rhpV8=
github.com/bufbuild/connect-grpchealth-go v1.1.1 h1:ldceS3m7+Qvl3GI4yzB4oCg3uOdD+Y1bytc/5xuMpqo=
Expand Down
4 changes: 2 additions & 2 deletions internal/gen/buf/connect/demo/eliza/v1/eliza.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b1936bd

Please sign in to comment.