replacer

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Nothing

type Nothing struct{}

type Replacement

type Replacement string

func (Replacement) String

func (r Replacement) String() string

type Replacer

type Replacer interface {
	Replace(old string) Variant
}

func Prefix added in v0.1.0

func Prefix(old, changeTo string) Replacer

func Regexp added in v0.1.0

func Regexp(from string, to string) (Replacer, error)

func Versioned added in v0.1.0

func Versioned(base string, jump int) (Replacer, error)

Versioned a replaced that cares about major version suffixes

type Suffix added in v0.1.0

type Suffix struct {
	Rest  string
	Major int
}

Suffix ...

func (*Suffix) Extract added in v0.1.0

func (p *Suffix) Extract(line string) (bool, error)

Extract ...

type Variant

type Variant interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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