Files
grpcurl/internal/testing/cmd/bankdemo
Scott Blum f5c25e012b Go 1.26 baseline, golangci-lint, dependency updates (#593)
* Go 1.26 baseline, golangci-lint, dependency updates

- Go baseline is now 1.26 (`go.mod`); CI tests the two newest majors, 1.26 and 1.27 (previously 1.23-1.25).
- Replaces the separate gofmt/vet/staticcheck/ineffassign/predeclared Makefile targets (and the unused golint/errcheck ones) with a single pinned `golangci-lint` v2 (`make lint`), configured in `.golangci.yml` to run the same checks.
- `go get -u -t ./... && go mod tidy`.
- Release workflow and Dockerfile now build with Go 1.27 (newest), while `go.mod` keeps 1.26 as the oldest supported version.
- Lint fixes: none needed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Regenerate protos and reformat with Go 1.27

Go 1.27's gofmt reformats doc comments in generated code, and CI's
checkgenerate runs on 1.27.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-19 14:24:46 -05:00
..

bankdemo

The bankdemo program is an example gRPC server that was used to demo grpcurl at Gophercon 2018.

It demonstrates interesting concepts for building a gRPC server, including chat functionality (that relies on full-duplex bidirectional streams). This code was written specifically to provide an interesting concrete demonstration and, as such, should not be considered in any way production-worthy.

The demo app tracks user accounts, transactions, and balances completely in memory. Every few seconds, as well as on graceful shutdown (like when the server receives a SIGTERM or SIGINT signal), this state is saved to a file named accounts.json, so that the data can be restored if the process restarts.

In addition to bank account data, the server also tracks "chat sessions", for demonstrating bidirectional streams in the form of an application where customers can chat with support agents.