Versions in this module Expand all Collapse all v1 v1.2.2 Apr 30, 2024 Changes in this version + func AppendString(filename string, src []byte, data string, opt *Options) error + func InsertString(filename string, src []byte, data string, opt *Options) error v1.2.1 Apr 30, 2024 Changes in this version type Editor + Opt *Options v1.2.0 Apr 30, 2024 Changes in this version + func Insert(filename string, src []byte, data string) error v1.1.0 Apr 30, 2024 Changes in this version type Editor + func (ed *Editor) Insert(b []byte) error + func (ed *Editor) InsertString(s string) error v1.0.0 Apr 28, 2024 Changes in this version + var Log *log.Logger + func Append(filename string, src []byte, data string) error + func Backup(fname string) (fbackup string, err error) + func Comment(filename string, src []byte, reLine string) error + func CommentM(filename string, src []byte, reLine []string) error + func CommentOut(filename string, src []byte, reLine string) error + func CommentOutM(filename string, src []byte, reLine []string) error + func Delete(filename string, src []byte, begin, end int64) error + func Replace(filename string, src []byte, r []Replacer) error + func ReplaceAtLine(filename string, src []byte, r []ReplacerAtLine) error + func ReplaceAtLineN(filename string, src []byte, r []ReplacerAtLine, n int) error + func ReplaceN(filename string, src []byte, r []Replacer, n int) error + type Editor struct + Opts *Options + func NewEditor(filename string, src []byte, opts *Options) (ed *Editor, err error) + func (ed *Editor) Append(b []byte) error + func (ed *Editor) AppendString(s string) error + func (ed *Editor) Close() error + func (ed *Editor) Comment(reLine []string) error + func (ed *Editor) CommentOut(reLine []string) error + func (ed *Editor) Delete(begin, end int64) error + func (ed *Editor) FileBackup() string + func (ed *Editor) Replace(r []Replacer) error + func (ed *Editor) ReplaceAtLine(r []ReplacerAtLine) error + func (ed *Editor) ReplaceAtLineN(r []ReplacerAtLine, n int) error + func (ed *Editor) ReplaceN(r []Replacer, n int) error + type Options struct + Backup bool + Comment []byte + func NewOptions() *Options + type Replacer struct + Replace string + Search string + type ReplacerAtLine struct + Line string + Replace string + Search string