Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix function comments based on best practices from Effective Go #116

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ func getDigestFunction(digest EVP_MD) (md *C.EVP_MD) {
return md
}

// Add an extension to a certificate.
// AddExtension adds an extension to a certificate.
// Extension constants are NID_* as found in openssl.
func (c *Certificate) AddExtension(nid NID, value string) error {
issuer := c
Expand Down
4 changes: 2 additions & 2 deletions ctx.go
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ func (c *Ctx) SetTimeout(t time.Duration) time.Duration {
return time.Duration(prev) * time.Second
}

// Get session cache timeout.
// GetTimeout gets session cache timeout.
// See https://www.openssl.org/docs/ssl/SSL_CTX_set_timeout.html
func (c *Ctx) GetTimeout() time.Duration {
return time.Duration(C.X_SSL_CTX_get_timeout(c.ctx)) * time.Second
Expand All @@ -561,7 +561,7 @@ func (c *Ctx) SessSetCacheSize(t int) int {
return int(C.X_SSL_CTX_sess_set_cache_size(c.ctx, C.long(t)))
}

// Get session cache size.
// SessGetCacheSize gets session cache size.
// https://www.openssl.org/docs/ssl/SSL_CTX_sess_set_cache_size.html
func (c *Ctx) SessGetCacheSize() int {
return int(C.X_SSL_CTX_sess_get_cache_size(c.ctx))
Expand Down
2 changes: 1 addition & 1 deletion digest.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func GetDigestByName(name string) (*Digest, error) {
return &Digest{ptr: p}, nil
}

// GetDigestByName returns the Digest with the NID or nil and an error if the
// GetDigestByNid returns the Digest with the NID or nil and an error if the
// digest was not found.
func GetDigestByNid(nid NID) (*Digest, error) {
sn, err := Nid2ShortName(nid)
Expand Down