tss

package
v0.0.0-...-a0d1b2d Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(w io.Writer, r io.Reader) (written int64, err error)

func CopyTime

func CopyTime(w io.Writer, r io.Reader, start time.Time) (written int64, err error)

func TimeScaler

func TimeScaler(d time.Duration) string

TimeScaler returns a format string for the given Duration where all of the decimals will line up in the same column (fourth from the end).

Types

type Writer

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

func NewWriter

func NewWriter(w io.Writer, start time.Time) *Writer

NewWriter creates a new Writer. If start is the zero value, the program's start time will be used.

func (*Writer) Write

func (w *Writer) Write(p []byte) (int, error)

Write writes the contents of p into the buffer. It returns the number of bytes written. If nn < len(p), it also returns an error explaining why the write is short.

Jump to

Keyboard shortcuts

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