chore: fix some comments (#2967)

Signed-off-by: kindknow <iturf@sina.com>
Co-authored-by: Monkey <golang@88.com>
This commit is contained in:
kindknow 2024-04-14 01:15:23 +08:00 committed by GitHub
parent f5496d14dd
commit 6960bcc08d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 5 deletions

View File

@ -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 // value, leave the value blank or remove the parameter
// - only the last value is interpreted if a parameter is given multiple times // - 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 // - 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 // names will be treated as unknown parameters
// - unknown parameter names will result in an error // - unknown parameter names will result in an error
// //

View File

@ -162,7 +162,7 @@ func (opt *ClusterOptions) init() {
// value, leave the value blank or remove the parameter // value, leave the value blank or remove the parameter
// - only the last value is interpreted if a parameter is given multiple times // - 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 // - 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 // names will be treated as unknown parameters
// - unknown parameter names will result in an error // - unknown parameter names will result in an error
// //

View File

@ -491,7 +491,7 @@ func (c *PubSub) getContext() context.Context {
// Receive* APIs can not be used after channel is created. // Receive* APIs can not be used after channel is created.
// //
// go-redis periodically sends ping messages to test connection health // 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 { func (c *PubSub) Channel(opts ...ChannelOption) <-chan *Message {
c.chOnce.Do(func() { c.chOnce.Do(func() {
c.msgCh = newChannel(c, opts...) c.msgCh = newChannel(c, opts...)

View File

@ -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 opt *redis.Options
var client *redis.Client var client *redis.Client
@ -484,7 +484,7 @@ var _ = Describe("Client context cancelation", func() {
Expect(client.Close()).NotTo(HaveOccurred()) Expect(client.Close()).NotTo(HaveOccurred())
}) })
It("Blocking operation cancelation", func() { It("Blocking operation cancellation", func() {
ctx, cancel := context.WithCancel(ctx) ctx, cancel := context.WithCancel(ctx)
cancel() cancel()