utility

package
v0.0.0-...-ba062bd Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDuration

func AddDuration(t int64, d string) int64

func CreateCapnpId

func CreateCapnpId() (capnpId string)

func CreateFile

func CreateFile(bytes []byte, filePath string)

func ExampleTimeStuff

func ExampleTimeStuff()

func FindFirstNodeByType

func FindFirstNodeByType(node *grizzly.Node, opType grizzly.OperatorType) (target *grizzly.Node, found bool)

func Init

func Init()

func NanoDuration

func NanoDuration(s string) int64

"1m1s1ms" --> 61001000000

func NanoNow

func NanoNow() int64

Example: 1641147953906468000

func NanoTime

func NanoTime(s string) int64

"2022-01-02T10:25:53.906468-08:00" --> 1641147953906468000

func PlanString

func PlanString() string

func RandomInt

func RandomInt(min int, max int) int

func RandomString

func RandomString(l int) string

func ReadBinaryFile

func ReadBinaryFile(path string) (root grizzly.Node)

func ReadBinaryPlan

func ReadBinaryPlan(reader io.Reader) (root grizzly.Node)

func ShowPlan

func ShowPlan()

func SubDuration

func SubDuration(t int64, d string) int64

func TimeString

func TimeString(i int64) (text string)

Example: 1641147953906468000 --> "2022-01-02T10:25:53.906468-08:00"

func UpcaseFirstLetter

func UpcaseFirstLetter(s string) string

Example: "foo" --> "Foo"

func WriteBinary

func WriteBinary(msg *capnp.Message, writer io.Writer)

func WriteBinaryFile

func WriteBinaryFile(msg *capnp.Message, path string)

func WriteJson

func WriteJson(root *grizzly.Node) (bytes []byte)

func WriteJsonFile

func WriteJsonFile(root *grizzly.Node, filePath string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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