utils

package
v0.0.0-...-4f4ce1e Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Average

func Average(xs []float64) float64

func MakeTimestamp

func MakeTimestamp() int64

func RandomIntArray

func RandomIntArray(size int32, max int32) []int32

func RandomLongArray

func RandomLongArray(size int32, max int64) []int64

Types

type Writer

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

func (*Writer) GetOutput

func (w *Writer) GetOutput() string

func (*Writer) UseConsole

func (w *Writer) UseConsole(value bool)

func (*Writer) Write

func (w *Writer) Write(format string, a ...interface{}) (n int, err error)

func (*Writer) WriteColor

func (w *Writer) WriteColor(color string, format string, a ...interface{}) (n int, err error)

func (*Writer) WriteHeader

func (w *Writer) WriteHeader(format string, a ...interface{}) (n int, err error)

func (*Writer) WriteLine

func (w *Writer) WriteLine(format string, a ...interface{}) (n int, err error)

func (*Writer) WriteNewLine

func (w *Writer) WriteNewLine() (n int, err error)

func (*Writer) WriteTitle

func (w *Writer) WriteTitle(format string, a ...interface{}) (n int, err error)

func (*Writer) WriteValue

func (w *Writer) WriteValue(format string, a ...interface{}) (n int, err error)

type WriterType

type WriterType interface {
	Write(format string, a ...interface{}) (n int, err error)

	WriteLine(format string, a ...interface{}) (n int, err error)

	WriteColor(color string, format string, a ...interface{}) (n int, err error)

	WriteNewLine() (n int, err error)

	WriteHeader(format string, a ...interface{}) (n int, err error)

	WriteValue(format string, a ...interface{}) (n int, err error)

	WriteTitle(format string, a ...interface{}) (n int, err error)

	UseConsole(value bool)

	GetOutput() string
}

func NewWriter

func NewWriter(filePath string) WriterType

Jump to

Keyboard shortcuts

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