You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was reading the documented for Ticker and I noticed that:
A Ticker holds a channel that delivers `ticks' of a clock at intervals.
Notice that "ticks" is enclosed between <backtick> and <single-quote>.
Reference to a similar issue from the issue tracker: #30955
Also, refer to this commit
I'm using BSD's grep with the regex "\x20`[^(\`\')]+'\x20" to find similar patterns in the codebase and I even could find some.
$ grep -r -E "\x20\`[^(\`\')]+\'\x20" /usr/local/Cellar/go/1.15.2/libexec/src
/usr/local/Cellar/go/1.15.2/libexec/src/cmd/go/go_test.go: tg.grepStderr("^hello world", `ldflags -X "main.extern=hello world"' failed`)
/usr/local/Cellar/go/1.15.2/libexec/src/cmd/vendor/golang.org/x/mod/module/module.go:// (The excluded punctuation characters, " * < > ? ` ' | / \ and :,
/usr/local/Cellar/go/1.15.2/libexec/src/compress/bzip2/bzip2.go: c [256]uint // the `C' array for the inverse BWT.
/usr/local/Cellar/go/1.15.2/libexec/src/compress/bzip2/bzip2.go: tt []uint32 // mirrors the `tt' array in the bzip2 source and contains the P array in the upper 24 bits.
/usr/local/Cellar/go/1.15.2/libexec/src/compress/bzip2/bzip2.go: // The `C' array (used by the inverse BWT) needs to be zero initialized.
/usr/local/Cellar/go/1.15.2/libexec/src/compress/bzip2/bzip2.go:// In that document, origPtr is called `I' and c is the `C' array after the
/usr/local/Cellar/go/1.15.2/libexec/src/compress/bzip2/bzip2.go:// This also implements the `single array' method from the bzip2 source code
/usr/local/Cellar/go/1.15.2/libexec/src/archive/tar/writer_test.go: // gnutar: Substituting `.' for empty member name
/usr/local/Cellar/go/1.15.2/libexec/src/archive/tar/writer_test.go: // gnutar: Substituting `.' for empty member name
/usr/local/Cellar/go/1.15.2/libexec/src/encoding/gob/encoder_test.go: t.Fatal("round 3: expected `bad type' error decoding ET2")
/usr/local/Cellar/go/1.15.2/libexec/src/time/tick.go:// A Ticker holds a channel that delivers `ticks' of a clock
(Note: There are some false positives as well)
So, I think we should either change
`<text>'
to
'<text>'
or
``<text>''
Although I know the history behind the usage of backticks and single quote but I still think that we should update it.
Also, it seems like a very small change but if it's to be considered then I'd like to send a CL for the same.
What did you expect to see?
$ go doc time.Ticker
package time // import "time"
type Ticker struct {
C <-chan Time // The channel on which the ticks are delivered.
// Has unexported fields.
}
A Ticker holds a channel that delivers “ticks” of a clock at intervals.
func NewTicker(d Duration) *Ticker
func (t *Ticker) Reset(d Duration)
func (t *Ticker) Stop()
or
$ go doc time.Ticker
package time // import "time"
type Ticker struct {
C <-chan Time // The channel on which the ticks are delivered.
// Has unexported fields.
}
A Ticker holds a channel that delivers 'ticks' of a clock at intervals.
func NewTicker(d Duration) *Ticker
func (t *Ticker) Reset(d Duration)
func (t *Ticker) Stop()
What did you see instead?
$ go doc time.Ticker
package time // import "time"
type Ticker struct {
C <-chan Time // The channel on which the ticks are delivered.
// Has unexported fields.
}
A Ticker holds a channel that delivers `ticks' of a clock at intervals.
func NewTicker(d Duration) *Ticker
func (t *Ticker) Reset(d Duration)
func (t *Ticker) Stop()
The text was updated successfully, but these errors were encountered:
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?Operating System: Mac OS Catalina
Arch: amd64
go env
OutputWhat did you do?
I was reading the documented for Ticker and I noticed that:
Notice that "ticks" is enclosed between
<backtick>
and<single-quote>
.Reference to a similar issue from the issue tracker: #30955
Also, refer to this commit
I'm using BSD's
grep
with the regex "\x20`[^(\`\')]+'\x20" to find similar patterns in the codebase and I even could find some.(Note: There are some false positives as well)
So, I think we should either change
to
or
Although I know the history behind the usage of
backticks
andsingle quote
but I still think that we should update it.Also, it seems like a very small change but if it's to be considered then I'd like to send a CL for the same.
What did you expect to see?
or
What did you see instead?
The text was updated successfully, but these errors were encountered: