"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "vendor/golang.org/x/text/transform/transform.go" between
buildah-1.10.1.tar.gz and buildah-1.11.0.tar.gz

About: Buildah is a tool that facilitates building Open Container Initiative (OCI) container images.

transform.go  (buildah-1.10.1):transform.go  (buildah-1.11.0)
skipping to change at line 81 skipping to change at line 81
// Span returns a position in src such that transforming src[:n] results in // Span returns a position in src such that transforming src[:n] results in
// identical output src[:n] for these bytes. It does not necessarily retu rn // identical output src[:n] for these bytes. It does not necessarily retu rn
// the largest such n. The atEOF argument tells whether src represents th e // the largest such n. The atEOF argument tells whether src represents th e
// last bytes of the input. // last bytes of the input.
// //
// Callers should always account for the n bytes consumed before // Callers should always account for the n bytes consumed before
// considering the error err. // considering the error err.
// //
// A nil error means that all input bytes are known to be identical to th e // A nil error means that all input bytes are known to be identical to th e
// output produced by the Transformer. A nil error can be be returned // output produced by the Transformer. A nil error can be returned
// regardless of whether atEOF is true. If err is nil, then then n must // regardless of whether atEOF is true. If err is nil, then n must
// equal len(src); the converse is not necessarily true. // equal len(src); the converse is not necessarily true.
// //
// ErrEndOfSpan means that the Transformer output may differ from the // ErrEndOfSpan means that the Transformer output may differ from the
// input after n bytes. Note that n may be len(src), meaning that the out put // input after n bytes. Note that n may be len(src), meaning that the out put
// would contain additional bytes after otherwise identical output. // would contain additional bytes after otherwise identical output.
// ErrShortSrc means that src had insufficient data to determine whether the // ErrShortSrc means that src had insufficient data to determine whether the
// remaining bytes would change. Other than the error conditions listed // remaining bytes would change. Other than the error conditions listed
// here, implementations are free to report other errors that arise. // here, implementations are free to report other errors that arise.
// //
// Calling Span can modify the Transformer state as a side effect. In // Calling Span can modify the Transformer state as a side effect. In
skipping to change at line 496 skipping to change at line 496
// downstream, as Transform would have bailed while handling ErrShortDst. // downstream, as Transform would have bailed while handling ErrShortDst.
if c.errStart > 0 { if c.errStart > 0 {
for i := 1; i < c.errStart; i++ { for i := 1; i < c.errStart; i++ {
c.link[i].p, c.link[i].n = 0, 0 c.link[i].p, c.link[i].n = 0, 0
} }
err, c.errStart, c.err = c.err, 0, nil err, c.errStart, c.err = c.err, 0, nil
} }
return dstL.n, srcL.p, err return dstL.n, srcL.p, err
} }
// Deprecated: use runes.Remove instead. // Deprecated: Use runes.Remove instead.
func RemoveFunc(f func(r rune) bool) Transformer { func RemoveFunc(f func(r rune) bool) Transformer {
return removeF(f) return removeF(f)
} }
type removeF func(r rune) bool type removeF func(r rune) bool
func (removeF) Reset() {} func (removeF) Reset() {}
// Transform implements the Transformer interface. // Transform implements the Transformer interface.
func (t removeF) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err err or) { func (t removeF) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err err or) {
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)