Documentation
¶
Overview ¶
Package internal contains internal methods and constants.
Index ¶
- Variables
- func Canonicalize(text string) string
- func CanonicalizeBytes(text []byte) []byte
- func NewNoOpWriteCloser(writer io.Writer) io.WriteCloser
- func NewSanitizeReader(r io.Reader) io.Reader
- func SanitizeString(input string) string
- func TrimEachLine(text string) string
- func TrimEachLineBytes(text []byte) []byte
- func Unarmor(input string) (*armor.Block, error)
- func UnarmorBytes(input []byte) (*armor.Block, error)
- type ResetReader
- type Utf8CheckWriteCloser
Constants ¶
This section is empty.
Variables ¶
View Source
var ArmorHeaders = map[string]string{}
ArmorHeaders is a map of default armor headers.
View Source
var ErrIncorrectUtf8 = errors.New("openpgp: data encoding is not valid utf-8")
Functions ¶
func Canonicalize ¶
func CanonicalizeBytes ¶
func NewNoOpWriteCloser ¶
func NewNoOpWriteCloser(writer io.Writer) io.WriteCloser
NewNoOpWriteCloser creates a WriteCloser form a Writer that performs no operation on close.
func SanitizeString ¶
func TrimEachLine ¶
func TrimEachLineBytes ¶
Types ¶
type ResetReader ¶
ResetReader is a reader that can be reset by buffering data internally.
func NewResetReader ¶
func NewResetReader(reader io.Reader) *ResetReader
NewResetReader creates a new ResetReader with the default state.
func (*ResetReader) DisableBuffering ¶
func (rr *ResetReader) DisableBuffering()
DisableBuffering disables the internal buffering. After the disable, a Reset is not allowed anymore.
type Utf8CheckWriteCloser ¶
type Utf8CheckWriteCloser struct {
// contains filtered or unexported fields
}
func NewUtf8CheckWriteCloser ¶
func NewUtf8CheckWriteCloser(wrap io.WriteCloser) *Utf8CheckWriteCloser
func (*Utf8CheckWriteCloser) Close ¶
func (cw *Utf8CheckWriteCloser) Close() (err error)
Click to show internal directories.
Click to hide internal directories.