Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoValue = errors.New("no text to replace")
Functions ¶
func Process ¶
Process replaces a text in the content of every live note of the account, through patchnote in one transaction: the locked notes are skipped and counted, and each note changed keeps a version of its text before. TODO: every note goes through patchnote within the 30 s of a request, fine for a few thousand changed; a job if more.
Types ¶
type Input ¶
type Input struct {
Find string `json:"find"`
Replace string `json:"replace"`
DryRun bool `json:"dry_run,omitempty" binding:"optional"`
Folder string `json:"folder,omitempty" binding:"optional"` // a folder id: only its notes, its subfolders included
}
Input is a plain text, no regex, found with its case. DryRun only counts, for the confirmation.