Help us shape the future of Go! Take the 2026 Go Developer Survey

configedit

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package configedit makes small, comment-preserving changes to a mailctl config file. It edits the YAML node tree rather than round-tripping through the config structs, which would delete every comment in the file.

Comments, key order, and quoting all survive an edit, because the yaml.Node tree carries them. Blank lines do not: yaml.Node has no node representing a blank line, so re-encoding the tree drops every blank line in the file, not just ones near the edited section. Callers that edit a hand-formatted file should tell the operator; see main's noteConfigRewritten.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAlias

func AddAlias(path, domain, match string, to []string) error

AddAlias appends an alias to a domain.

func AddMailbox

func AddMailbox(path, domain, address, passwordEnv string) error

AddMailbox appends a mailbox to a domain.

func RemoveAlias

func RemoveAlias(path, domain, match string) error

RemoveAlias drops an alias from a domain.

func RemoveMailbox

func RemoveMailbox(path, domain, address string) error

RemoveMailbox drops a mailbox from a domain. It does not delete the mailbox at the provider; that happens on the next apply with -prune.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL