utils

package
v0.0.0-...-2ae3964 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedIO = errors.New("unsupported io operation")
)
View Source
var Null = null{}

Null is a reader/writer that returns EOF to all reads and writes

Functions

func NewRunesScanner

func NewRunesScanner(reader io.Reader, runes []rune) *bufio.Scanner

Creates a new bufio.Scanner that is configured to scan words separated by one of the runes provided

func ReverseString

func ReverseString(s string) (result string)

Types

type ErrorReadWriterErrR

type ErrorReadWriterErrR struct{ io.Writer }

A ReadWriter that returns ErrUnsupportedIO for read operations

func (ErrorReadWriterErrR) Close

func (e ErrorReadWriterErrR) Close() error

func (ErrorReadWriterErrR) Read

func (e ErrorReadWriterErrR) Read(p []byte) (n int, err error)

func (ErrorReadWriterErrR) Write

func (e ErrorReadWriterErrR) Write(p []byte) (n int, err error)

type ErrorReadWriterErrW

type ErrorReadWriterErrW struct{ io.Reader }

A ReadWriter that returns ErrUnsupportedIO for write operations

func (ErrorReadWriterErrW) Close

func (e ErrorReadWriterErrW) Close() error

func (ErrorReadWriterErrW) Read

func (e ErrorReadWriterErrW) Read(p []byte) (n int, err error)

func (ErrorReadWriterErrW) Write

func (e ErrorReadWriterErrW) Write(p []byte) (n int, err error)

type NopWriteCloser

type NopWriteCloser struct {
	// contains filtered or unexported fields
}

func NewNopWriteCloser

func NewNopWriteCloser(w io.Writer) *NopWriteCloser

func (NopWriteCloser) Close

func (w NopWriteCloser) Close() error

func (NopWriteCloser) Write

func (w NopWriteCloser) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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