utils

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile added in v0.4.0

func CopyFile(src, dst string) error

CopyFile copies a named file from src to dst. If the destination file exists, it is truncated.

Types

type CountingReader added in v0.4.0

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

CountingReader wraps an io.Reader, adding a ReadCount method to get the total bytes read over multiple calls to Read. This is helpful if the Reader passes through other functions that do not return the bytes read.

func NewCountingReader added in v0.4.0

func NewCountingReader(r io.Reader) *CountingReader

func (*CountingReader) Read added in v0.4.0

func (cr *CountingReader) Read(p []byte) (int, error)

func (*CountingReader) ReadByte added in v0.4.0

func (cr *CountingReader) ReadByte() (byte, error)

func (*CountingReader) ReadCount added in v0.4.0

func (cr *CountingReader) ReadCount() int64

type CountingWriter added in v0.4.0

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

CountingWriter wraps an io.Writer, adding a Written method to get the total bytes written over multiple calls to Write. This is helpful if the Writer passes through other functions that do not return the bytes written.

func NewCountingWriter added in v0.4.0

func NewCountingWriter(w io.Writer) *CountingWriter

func (*CountingWriter) Write added in v0.4.0

func (cw *CountingWriter) Write(p []byte) (int, error)

func (*CountingWriter) Written added in v0.4.0

func (cw *CountingWriter) Written() int64

Directories

Path Synopsis
package json includes JSON utilities commonly used in Kwil.
package json includes JSON utilities commonly used in Kwil.

Jump to

Keyboard shortcuts

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