Documentation ¶
Overview ¶
Package stdio provide some standard IO util functions.
Index ¶
- func DiscardReader(src io.Reader)
- func MustReadReader(r io.Reader) []byte
- func NewIOReader(in any) io.Reader
- func NewScanner(in any) *bufio.Scanner
- func QuietFprint(w io.Writer, ss ...string)
- func QuietFprintf(w io.Writer, tpl string, vs ...any)
- func QuietFprintln(w io.Writer, ss ...string)
- func QuietWriteString(w io.Writer, ss ...string)
- func ReadString(r io.Reader) string
- type WriteWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustReadReader ¶
MustReadReader read contents from io.Reader, will panic on error
func NewIOReader ¶
NewIOReader instance by input: string, bytes, io.Reader
func NewScanner ¶
NewScanner instance by input data or reader
func QuietFprint ¶
QuietFprint to writer, will ignore error
func QuietFprintf ¶
QuietFprintf to writer, will ignore error
func QuietFprintln ¶
QuietFprintln to writer, will ignore error
func QuietWriteString ¶
QuietWriteString to writer, will ignore error
Types ¶
type WriteWrapper ¶
WriteWrapper warp io.Writer support more operate methods.
func (*WriteWrapper) Write ¶
func (w *WriteWrapper) Write(p []byte) (n int, err error)
Write bytes data
func (*WriteWrapper) WriteString ¶
func (w *WriteWrapper) WriteString(s string) (n int, err error)
WriteString data
Click to show internal directories.
Click to hide internal directories.