mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-17 14:37:02 +00:00
Update Go doc comments to Go 1.19's format
This patch is the result of running Go 1.19's `gofmt` on the codebase, which automatically updates all Go doc comments to the new format. https://tip.golang.org/doc/go1.19#go-doc
This commit is contained in:
@@ -3,16 +3,15 @@
|
|||||||
// The resolver can parse many files for different domains, and perform
|
// The resolver can parse many files for different domains, and perform
|
||||||
// lookups to resolve the aliases.
|
// lookups to resolve the aliases.
|
||||||
//
|
//
|
||||||
//
|
// # File format
|
||||||
// File format
|
|
||||||
//
|
//
|
||||||
// It generally follows the traditional aliases format used by sendmail and
|
// It generally follows the traditional aliases format used by sendmail and
|
||||||
// exim.
|
// exim.
|
||||||
//
|
//
|
||||||
// The file can contain lines of the form:
|
// The file can contain lines of the form:
|
||||||
//
|
//
|
||||||
// user: address, address
|
// user: address, address
|
||||||
// user: | command
|
// user: | command
|
||||||
//
|
//
|
||||||
// Lines starting with "#" are ignored, as well as empty lines.
|
// Lines starting with "#" are ignored, as well as empty lines.
|
||||||
// User names cannot contain spaces, ":" or commas, for parsing reasons. This
|
// User names cannot contain spaces, ":" or commas, for parsing reasons. This
|
||||||
@@ -27,18 +26,16 @@
|
|||||||
// If the user is the string "*", then it is considered a "catch-all alias":
|
// If the user is the string "*", then it is considered a "catch-all alias":
|
||||||
// emails that don't match any known users or other aliases will be sent here.
|
// emails that don't match any known users or other aliases will be sent here.
|
||||||
//
|
//
|
||||||
//
|
// # Recipients
|
||||||
// Recipients
|
|
||||||
//
|
//
|
||||||
// Recipients can be of different types:
|
// Recipients can be of different types:
|
||||||
// - Email: the usual user@domain we all know and love, this is the default.
|
// - Email: the usual user@domain we all know and love, this is the default.
|
||||||
// - Pipe: if the right side starts with "| ", the rest of the line specifies
|
// - Pipe: if the right side starts with "| ", the rest of the line specifies
|
||||||
// a command to pipe the email through.
|
// a command to pipe the email through.
|
||||||
// Command and arguments are space separated. No quoting, escaping, or
|
// Command and arguments are space separated. No quoting, escaping, or
|
||||||
// replacements of any kind.
|
// replacements of any kind.
|
||||||
//
|
//
|
||||||
//
|
// # Lookups
|
||||||
// Lookups
|
|
||||||
//
|
//
|
||||||
// The resolver will perform lookups recursively, until it finds all the final
|
// The resolver will perform lookups recursively, until it finds all the final
|
||||||
// recipients.
|
// recipients.
|
||||||
@@ -46,8 +43,7 @@
|
|||||||
// There are recursion limits to avoid alias loops. If the limit is reached,
|
// There are recursion limits to avoid alias loops. If the limit is reached,
|
||||||
// the entire resolution will fail.
|
// the entire resolution will fail.
|
||||||
//
|
//
|
||||||
//
|
// # Suffix removal
|
||||||
// Suffix removal
|
|
||||||
//
|
//
|
||||||
// The resolver can also remove suffixes from emails, and drop characters
|
// The resolver can also remove suffixes from emails, and drop characters
|
||||||
// completely. This can be used to turn "user+blah@domain" into "user@domain",
|
// completely. This can be used to turn "user+blah@domain" into "user@domain",
|
||||||
|
|||||||
@@ -162,7 +162,8 @@ func (a *Authenticator) Reload() error {
|
|||||||
// DecodeResponse decodes a plain auth response.
|
// DecodeResponse decodes a plain auth response.
|
||||||
//
|
//
|
||||||
// It must be a a base64-encoded string of the form:
|
// It must be a a base64-encoded string of the form:
|
||||||
// <authorization id> NUL <authentication id> NUL <password>
|
//
|
||||||
|
// <authorization id> NUL <authentication id> NUL <password>
|
||||||
//
|
//
|
||||||
// https://tools.ietf.org/html/rfc4954#section-4.1.
|
// https://tools.ietf.org/html/rfc4954#section-4.1.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ var (
|
|||||||
|
|
||||||
// MDA delivers local mail by executing a local binary, like procmail or
|
// MDA delivers local mail by executing a local binary, like procmail or
|
||||||
// maildrop. It works with any binary that:
|
// maildrop. It works with any binary that:
|
||||||
// - Receives the email to deliver via stdin.
|
// - Receives the email to deliver via stdin.
|
||||||
// - Exits with code EX_TEMPFAIL (75) for transient issues.
|
// - Exits with code EX_TEMPFAIL (75) for transient issues.
|
||||||
type MDA struct {
|
type MDA struct {
|
||||||
Binary string // Path to the binary.
|
Binary string // Path to the binary.
|
||||||
Args []string // Arguments to pass.
|
Args []string // Arguments to pass.
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
// Package smtp implements the Simple Mail Transfer Protocol as defined in RFC
|
// Package smtp implements the Simple Mail Transfer Protocol as defined in RFC
|
||||||
// 5321. It extends net/smtp as follows:
|
// 5321. It extends net/smtp as follows:
|
||||||
//
|
//
|
||||||
// - Supports SMTPUTF8, via MailAndRcpt.
|
// - Supports SMTPUTF8, via MailAndRcpt.
|
||||||
// - Adds IsPermanent.
|
// - Adds IsPermanent.
|
||||||
//
|
|
||||||
package smtp
|
package smtp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -87,11 +86,11 @@ func (c *Client) MailAndRcpt(from string, to string) error {
|
|||||||
|
|
||||||
// prepareForSMTPUTF8 prepares the address for SMTPUTF8.
|
// prepareForSMTPUTF8 prepares the address for SMTPUTF8.
|
||||||
// It returns:
|
// It returns:
|
||||||
// - The address to use. It is based on addr, and possibly modified to make
|
// - The address to use. It is based on addr, and possibly modified to make
|
||||||
// it not need the extension, if the server does not support it.
|
// it not need the extension, if the server does not support it.
|
||||||
// - Whether the address needs the extension or not.
|
// - Whether the address needs the extension or not.
|
||||||
// - An error if the address needs the extension, but the client does not
|
// - An error if the address needs the extension, but the client does not
|
||||||
// support it.
|
// support it.
|
||||||
func (c *Client) prepareForSMTPUTF8(addr string) (string, bool, error) {
|
func (c *Client) prepareForSMTPUTF8(addr string) (string, bool, error) {
|
||||||
// ASCII address pass through.
|
// ASCII address pass through.
|
||||||
if isASCII(addr) {
|
if isASCII(addr) {
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
// Note that "report" mode is not supported.
|
// Note that "report" mode is not supported.
|
||||||
//
|
//
|
||||||
// Reference: https://tools.ietf.org/html/rfc8461
|
// Reference: https://tools.ietf.org/html/rfc8461
|
||||||
//
|
|
||||||
package sts
|
package sts
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// Package userdb implements a simple user database.
|
// Package userdb implements a simple user database.
|
||||||
//
|
//
|
||||||
//
|
// # Format
|
||||||
// Format
|
|
||||||
//
|
//
|
||||||
// The user database is a file containing a list of users and their passwords,
|
// The user database is a file containing a list of users and their passwords,
|
||||||
// encrypted with some scheme.
|
// encrypted with some scheme.
|
||||||
@@ -13,21 +12,18 @@
|
|||||||
// Users must be UTF-8 and NOT contain whitespace; the library will enforce
|
// Users must be UTF-8 and NOT contain whitespace; the library will enforce
|
||||||
// this.
|
// this.
|
||||||
//
|
//
|
||||||
//
|
// # Schemes
|
||||||
// Schemes
|
|
||||||
//
|
//
|
||||||
// The default scheme is SCRYPT, with hard-coded parameters. The API does not
|
// The default scheme is SCRYPT, with hard-coded parameters. The API does not
|
||||||
// allow the user to change this, at least for now.
|
// allow the user to change this, at least for now.
|
||||||
// A PLAIN scheme is also supported for debugging purposes.
|
// A PLAIN scheme is also supported for debugging purposes.
|
||||||
//
|
//
|
||||||
//
|
// # Writing
|
||||||
// Writing
|
|
||||||
//
|
//
|
||||||
// The functions that write a database file will not preserve ordering,
|
// The functions that write a database file will not preserve ordering,
|
||||||
// invalid lines, empty lines, or any formatting.
|
// invalid lines, empty lines, or any formatting.
|
||||||
//
|
//
|
||||||
// It is also not safe for concurrent use from different processes.
|
// It is also not safe for concurrent use from different processes.
|
||||||
//
|
|
||||||
package userdb
|
package userdb
|
||||||
|
|
||||||
//go:generate protoc --go_out=. --go_opt=paths=source_relative userdb.proto
|
//go:generate protoc --go_out=. --go_opt=paths=source_relative userdb.proto
|
||||||
|
|||||||
@@ -5,18 +5,17 @@
|
|||||||
//
|
//
|
||||||
// It takes an "answers" file which contains lines with the following format:
|
// It takes an "answers" file which contains lines with the following format:
|
||||||
//
|
//
|
||||||
// <domain> <type> <value>
|
// <domain> <type> <value>
|
||||||
//
|
//
|
||||||
// For example:
|
// For example:
|
||||||
//
|
//
|
||||||
// blah A 1.2.3.4
|
// blah A 1.2.3.4
|
||||||
// blah MX mx1
|
// blah MX mx1
|
||||||
//
|
//
|
||||||
// Supported types: A, AAAA, MX, TXT.
|
// Supported types: A, AAAA, MX, TXT.
|
||||||
//
|
//
|
||||||
// It's only meant to be used for testing, so it's not robust, performant, or
|
// It's only meant to be used for testing, so it's not robust, performant, or
|
||||||
// standards compliant.
|
// standards compliant.
|
||||||
//
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|||||||
Reference in New Issue
Block a user