mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-17 14:37:02 +00:00
docs: Add missing docstrings, adjust wording to match standard style
This patch adds a missing docstrings for exported identifiers, and adjust some of the existing ones to match the standard style. In some cases, the identifiers were un-exported after noticing they had no external users. Besides improving documentation, it also reduces the linter noise significantly.
This commit is contained in:
@@ -41,7 +41,7 @@ func Domain(domain string) (string, error) {
|
||||
return d, nil
|
||||
}
|
||||
|
||||
// Name normalizes an email address, applying User and Domain to its
|
||||
// Addr normalizes an email address, applying User and Domain to its
|
||||
// respective components.
|
||||
// On error, it will also return the original address to simplify callers.
|
||||
func Addr(addr string) (string, error) {
|
||||
@@ -60,8 +60,8 @@ func Addr(addr string) (string, error) {
|
||||
return user + "@" + domain, nil
|
||||
}
|
||||
|
||||
// Take an address with an ASCII domain, and convert it to Unicode as per
|
||||
// IDNA, including basic normalization.
|
||||
// DomainToUnicode takes an address with an ASCII domain, and convert it to
|
||||
// Unicode as per IDNA, including basic normalization.
|
||||
// The user part is unchanged.
|
||||
func DomainToUnicode(addr string) (string, error) {
|
||||
if addr == "<>" {
|
||||
|
||||
Reference in New Issue
Block a user