From dbcc2a8f26ac9045fb40f5933e456c036e2a497e Mon Sep 17 00:00:00 2001 From: Vlad Gorodetsky Date: Tue, 19 Jan 2021 08:49:09 +0200 Subject: [PATCH] Update docs, reference pkg.go.dev --- .github/workflows/ci.yml | 2 +- README.md | 6 +++--- examples/README.md | 4 ++-- mocks/README.md | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 549b3bfed..51c34a430 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: - name: Install dependencies run: | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.33.0 + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.35.2 export REPOSITORY_ROOT=${GITHUB_WORKSPACE} - name: Run test suite diff --git a/README.md b/README.md index 629be3b6f..c57c3a78a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # sarama -[![GoDoc](https://godoc.org/github.com/Shopify/sarama?status.svg)](https://pkg.go.dev/github.com/Shopify/sarama) +[![Go Reference](https://pkg.go.dev/badge/github.com/Shopify/sarama.svg)](https://pkg.go.dev/github.com/Shopify/sarama) [![Build Status](https://travis-ci.org/Shopify/sarama.svg?branch=master)](https://travis-ci.org/Shopify/sarama) [![Coverage](https://codecov.io/gh/Shopify/sarama/branch/master/graph/badge.svg)](https://codecov.io/gh/Shopify/sarama) @@ -8,7 +8,7 @@ Sarama is an MIT-licensed Go client library for [Apache Kafka](https://kafka.apa ## Getting started -- API documentation and examples are available via [godoc](https://godoc.org/github.com/Shopify/sarama). +- API documentation and examples are available via [pkg.go.dev](https://pkg.go.dev/github.com/Shopify/sarama). - Mocks for testing are available in the [mocks](./mocks) subpackage. - The [examples](./examples) directory contains more elaborate example applications. - The [tools](./tools) directory contains command line tools that can be useful for testing, diagnostics, and instrumentation. @@ -20,7 +20,7 @@ You might also want to look at the [Frequently Asked Questions](https://github.c Sarama provides a "2 releases + 2 months" compatibility guarantee: we support the two latest stable releases of Kafka and Go, and we provide a two month grace period for older releases. This means we currently officially support -Go 1.13 through 1.14, and Kafka 2.4 through 2.6, although older releases are +Go 1.14 through 1.15, and Kafka 2.5 through 2.7, although older releases are still likely to work. Sarama follows semantic versioning and provides API stability via the gopkg.in service. diff --git a/examples/README.md b/examples/README.md index 673154314..b523a6f0a 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,12 +1,12 @@ # Sarama examples -This folder contains example applications to demonstrate the use of Sarama. For code snippet examples on how to use the different types in Sarama, see [Sarama's API documentation on godoc.org](https://godoc.org/github.com/Shopify/sarama) +This folder contains example applications to demonstrate the use of Sarama. For code snippet examples on how to use the different types in Sarama, see [Sarama's API documentation on pkg.go.dev](https://pkg.go.dev/github.com/Shopify/sarama) In these examples, we use `github.com/Shopify/sarama` as import path. We do this to ensure all the examples are up to date with the latest changes in Sarama. For your own applications, you may want to use `gopkg.in/Shopify/sarama.v1` to lock into a stable API version. #### HTTP server -[http_server](./http_server) is a simple HTTP server uses both the sync producer to produce data as part of the request handling cycle, as well as the async producer to maintain an access log. It also uses the [mocks subpackage](https://godoc.org/github.com/Shopify/sarama/mocks) to test both. +[http_server](./http_server) is a simple HTTP server uses both the sync producer to produce data as part of the request handling cycle, as well as the async producer to maintain an access log. It also uses the [mocks subpackage](https://pkg.go.dev/github.com/Shopify/sarama/mocks) to test both. #### Interceptors diff --git a/mocks/README.md b/mocks/README.md index 55a6c2e61..2f3b88370 100644 --- a/mocks/README.md +++ b/mocks/README.md @@ -5,9 +5,9 @@ You can use them to test your sarama applications using dependency injection. The following mock objects are available: -- [Consumer](https://godoc.org/github.com/Shopify/sarama/mocks#Consumer), which will create [PartitionConsumer](https://godoc.org/github.com/Shopify/sarama/mocks#PartitionConsumer) mocks. -- [AsyncProducer](https://godoc.org/github.com/Shopify/sarama/mocks#AsyncProducer) -- [SyncProducer](https://godoc.org/github.com/Shopify/sarama/mocks#SyncProducer) +- [Consumer](https://pkg.go.dev/github.com/Shopify/sarama/mocks#Consumer), which will create [PartitionConsumer](https://pkg.go.dev/github.com/Shopify/sarama/mocks#PartitionConsumer) mocks. +- [AsyncProducer](https://pkg.go.dev/github.com/Shopify/sarama/mocks#AsyncProducer) +- [SyncProducer](https://pkg.go.dev/github.com/Shopify/sarama/mocks#SyncProducer) The mocks allow you to set expectations on them. When you close the mocks, the expectations will be verified, and the results will be reported to the `*testing.T` object you provided when creating the mock.