...
Package bytereplacer
Overview ▹
Index ▹
type Replacer ¶
Replacer replaces a list of strings with replacements. It is safe for concurrent use by multiple goroutines.
type Replacer struct {
    // contains filtered or unexported fields
}
			
			
			
			
			
			
				
				func New ¶
func New(oldnew ...string) *Replacer
New returns a new Replacer from a list of old, new string pairs. Replacements are performed in order, without overlapping matches.
func (*Replacer) Replace ¶
func (r *Replacer) Replace(s []byte) []byte
Replace performs all replacements in-place on s. If the capacity of s is not sufficient, a new slice is allocated, otherwise Replace returns s.
 ActiveGo 1.8
  ActiveGo 1.8