mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-16 14:27:01 +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
|
||||
// lookups to resolve the aliases.
|
||||
//
|
||||
//
|
||||
// File format
|
||||
// # File format
|
||||
//
|
||||
// It generally follows the traditional aliases format used by sendmail and
|
||||
// exim.
|
||||
//
|
||||
// The file can contain lines of the form:
|
||||
//
|
||||
// user: address, address
|
||||
// user: | command
|
||||
// user: address, address
|
||||
// user: | command
|
||||
//
|
||||
// Lines starting with "#" are ignored, as well as empty lines.
|
||||
// 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":
|
||||
// emails that don't match any known users or other aliases will be sent here.
|
||||
//
|
||||
//
|
||||
// Recipients
|
||||
// # Recipients
|
||||
//
|
||||
// Recipients can be of different types:
|
||||
// - 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
|
||||
// a command to pipe the email through.
|
||||
// Command and arguments are space separated. No quoting, escaping, or
|
||||
// replacements of any kind.
|
||||
// - 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
|
||||
// a command to pipe the email through.
|
||||
// Command and arguments are space separated. No quoting, escaping, or
|
||||
// replacements of any kind.
|
||||
//
|
||||
//
|
||||
// Lookups
|
||||
// # Lookups
|
||||
//
|
||||
// The resolver will perform lookups recursively, until it finds all the final
|
||||
// recipients.
|
||||
@@ -46,8 +43,7 @@
|
||||
// There are recursion limits to avoid alias loops. If the limit is reached,
|
||||
// the entire resolution will fail.
|
||||
//
|
||||
//
|
||||
// Suffix removal
|
||||
// # Suffix removal
|
||||
//
|
||||
// The resolver can also remove suffixes from emails, and drop characters
|
||||
// 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.
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
|
||||
@@ -20,8 +20,8 @@ var (
|
||||
|
||||
// MDA delivers local mail by executing a local binary, like procmail or
|
||||
// maildrop. It works with any binary that:
|
||||
// - Receives the email to deliver via stdin.
|
||||
// - Exits with code EX_TEMPFAIL (75) for transient issues.
|
||||
// - Receives the email to deliver via stdin.
|
||||
// - Exits with code EX_TEMPFAIL (75) for transient issues.
|
||||
type MDA struct {
|
||||
Binary string // Path to the binary.
|
||||
Args []string // Arguments to pass.
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
// Package smtp implements the Simple Mail Transfer Protocol as defined in RFC
|
||||
// 5321. It extends net/smtp as follows:
|
||||
//
|
||||
// - Supports SMTPUTF8, via MailAndRcpt.
|
||||
// - Adds IsPermanent.
|
||||
//
|
||||
// - Supports SMTPUTF8, via MailAndRcpt.
|
||||
// - Adds IsPermanent.
|
||||
package smtp
|
||||
|
||||
import (
|
||||
@@ -87,11 +86,11 @@ func (c *Client) MailAndRcpt(from string, to string) error {
|
||||
|
||||
// prepareForSMTPUTF8 prepares the address for SMTPUTF8.
|
||||
// It returns:
|
||||
// - 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.
|
||||
// - Whether the address needs the extension or not.
|
||||
// - An error if the address needs the extension, but the client does not
|
||||
// support it.
|
||||
// - 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.
|
||||
// - Whether the address needs the extension or not.
|
||||
// - An error if the address needs the extension, but the client does not
|
||||
// support it.
|
||||
func (c *Client) prepareForSMTPUTF8(addr string) (string, bool, error) {
|
||||
// ASCII address pass through.
|
||||
if isASCII(addr) {
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
// Note that "report" mode is not supported.
|
||||
//
|
||||
// Reference: https://tools.ietf.org/html/rfc8461
|
||||
//
|
||||
package sts
|
||||
|
||||
import (
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// Package userdb implements a simple user database.
|
||||
//
|
||||
//
|
||||
// Format
|
||||
// # Format
|
||||
//
|
||||
// The user database is a file containing a list of users and their passwords,
|
||||
// encrypted with some scheme.
|
||||
@@ -13,21 +12,18 @@
|
||||
// Users must be UTF-8 and NOT contain whitespace; the library will enforce
|
||||
// this.
|
||||
//
|
||||
//
|
||||
// Schemes
|
||||
// # Schemes
|
||||
//
|
||||
// The default scheme is SCRYPT, with hard-coded parameters. The API does not
|
||||
// allow the user to change this, at least for now.
|
||||
// A PLAIN scheme is also supported for debugging purposes.
|
||||
//
|
||||
//
|
||||
// Writing
|
||||
// # Writing
|
||||
//
|
||||
// The functions that write a database file will not preserve ordering,
|
||||
// invalid lines, empty lines, or any formatting.
|
||||
//
|
||||
// It is also not safe for concurrent use from different processes.
|
||||
//
|
||||
package userdb
|
||||
|
||||
//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:
|
||||
//
|
||||
// <domain> <type> <value>
|
||||
// <domain> <type> <value>
|
||||
//
|
||||
// For example:
|
||||
//
|
||||
// blah A 1.2.3.4
|
||||
// blah MX mx1
|
||||
// blah A 1.2.3.4
|
||||
// blah MX mx1
|
||||
//
|
||||
// Supported types: A, AAAA, MX, TXT.
|
||||
//
|
||||
// It's only meant to be used for testing, so it's not robust, performant, or
|
||||
// standards compliant.
|
||||
//
|
||||
package main
|
||||
|
||||
import (
|
||||
|
||||
Reference in New Issue
Block a user