Skip to content

Commit

Permalink
all: change some function documentation to be more idiomatic
Browse files Browse the repository at this point in the history
Change-Id: I932de9bb061a8ba3332ef03207983e8b98d6f1e5
Reviewed-on: https://go-review.googlesource.com/c/go/+/187918
Reviewed-by: Brad Fitzpatrick <[email protected]>
Run-TryBot: Brad Fitzpatrick <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
  • Loading branch information
dominikh authored and bradfitz committed Jul 28, 2019
1 parent a25c287 commit c4ca603
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/crypto/rsa/rsa.go
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ func decryptAndCheck(random io.Reader, priv *PrivateKey, c *big.Int) (m *big.Int
}

// DecryptOAEP decrypts ciphertext using RSA-OAEP.

//
// OAEP is parameterised by a hash function that is used as a random oracle.
// Encryption and decryption of a given message must use the same hash function
// and sha256.New() is a reasonable choice.
Expand Down
2 changes: 1 addition & 1 deletion src/encoding/csv/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func NewWriter(w io.Writer) *Writer {
}
}

// Writer writes a single CSV record to w along with any necessary quoting.
// Write writes a single CSV record to w along with any necessary quoting.
// A record is a slice of strings with each string being one field.
// Writes are buffered, so Flush must eventually be called to ensure
// that the record is written to the underlying io.Writer.
Expand Down
2 changes: 1 addition & 1 deletion src/expvar/expvar.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func (v *Map) AddFloat(key string, delta float64) {
}
}

// Deletes the given key from the map.
// Delete deletes the given key from the map.
func (v *Map) Delete(key string) {
v.keysMu.Lock()
defer v.keysMu.Unlock()
Expand Down
4 changes: 2 additions & 2 deletions src/go/types/scope.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func NewScope(parent *Scope, pos, end token.Pos, comment string) *Scope {
// Parent returns the scope's containing (parent) scope.
func (s *Scope) Parent() *Scope { return s.parent }

// Len() returns the number of scope elements.
// Len returns the number of scope elements.
func (s *Scope) Len() int { return len(s.elems) }

// Names returns the scope's element names in sorted order.
Expand All @@ -57,7 +57,7 @@ func (s *Scope) Names() []string {
return names
}

// NumChildren() returns the number of scopes nested in s.
// NumChildren returns the number of scopes nested in s.
func (s *Scope) NumChildren() int { return len(s.children) }

// Child returns the i'th child scope for 0 <= i < NumChildren().
Expand Down
2 changes: 1 addition & 1 deletion src/go/types/typestring.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
//
type Qualifier func(*Package) string

// RelativeTo(pkg) returns a Qualifier that fully qualifies members of
// RelativeTo returns a Qualifier that fully qualifies members of
// all packages other than pkg.
func RelativeTo(pkg *Package) Qualifier {
if pkg == nil {
Expand Down
2 changes: 1 addition & 1 deletion src/net/mail/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ type Address struct {
Address string // user@domain
}

// Parses a single RFC 5322 address, e.g. "Barry Gibbs <[email protected]>"
// ParseAddress parses a single RFC 5322 address, e.g. "Barry Gibbs <[email protected]>"
func ParseAddress(address string) (*Address, error) {
return (&addrParser{s: address}).parseSingleAddress()
}
Expand Down

0 comments on commit c4ca603

Please sign in to comment.