From 6960bcc08db24d46c6e3b76a49f7087347f51eb6 Mon Sep 17 00:00:00 2001 From: kindknow <166522338+kindknow@users.noreply.github.com> Date: Sun, 14 Apr 2024 01:15:23 +0800 Subject: [PATCH] chore: fix some comments (#2967) Signed-off-by: kindknow Co-authored-by: Monkey --- options.go | 2 +- osscluster.go | 2 +- pubsub.go | 2 +- redis_test.go | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/options.go b/options.go index f6e5078f..d0fbdadf 100644 --- a/options.go +++ b/options.go @@ -255,7 +255,7 @@ func NewDialer(opt *Options) func(context.Context, string, string) (net.Conn, er // value, leave the value blank or remove the parameter // - only the last value is interpreted if a parameter is given multiple times // - fields "network", "addr", "username" and "password" can only be set using other -// URL attributes (scheme, host, userinfo, resp.), query paremeters using these +// URL attributes (scheme, host, userinfo, resp.), query parameters using these // names will be treated as unknown parameters // - unknown parameter names will result in an error // diff --git a/osscluster.go b/osscluster.go index de1e3bf5..26261bb0 100644 --- a/osscluster.go +++ b/osscluster.go @@ -162,7 +162,7 @@ func (opt *ClusterOptions) init() { // value, leave the value blank or remove the parameter // - only the last value is interpreted if a parameter is given multiple times // - fields "network", "addr", "username" and "password" can only be set using other -// URL attributes (scheme, host, userinfo, resp.), query paremeters using these +// URL attributes (scheme, host, userinfo, resp.), query parameters using these // names will be treated as unknown parameters // - unknown parameter names will result in an error // diff --git a/pubsub.go b/pubsub.go index 5df537c4..aea96241 100644 --- a/pubsub.go +++ b/pubsub.go @@ -491,7 +491,7 @@ func (c *PubSub) getContext() context.Context { // Receive* APIs can not be used after channel is created. // // go-redis periodically sends ping messages to test connection health -// and re-subscribes if ping can not not received for 1 minute. +// and re-subscribes if ping can not received for 1 minute. func (c *PubSub) Channel(opts ...ChannelOption) <-chan *Message { c.chOnce.Do(func() { c.msgCh = newChannel(c, opts...) diff --git a/redis_test.go b/redis_test.go index 66d69c73..ef212545 100644 --- a/redis_test.go +++ b/redis_test.go @@ -469,7 +469,7 @@ var _ = Describe("Client OnConnect", func() { }) }) -var _ = Describe("Client context cancelation", func() { +var _ = Describe("Client context cancellation", func() { var opt *redis.Options var client *redis.Client @@ -484,7 +484,7 @@ var _ = Describe("Client context cancelation", func() { Expect(client.Close()).NotTo(HaveOccurred()) }) - It("Blocking operation cancelation", func() { + It("Blocking operation cancellation", func() { ctx, cancel := context.WithCancel(ctx) cancel()