utils

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExitIfError

func ExitIfError(err error)

ExitIfError exists with error message if err is not nil.

func Fail

func Fail(msg string, args ...interface{})

Fail prints failure message in stderr.

func Failed

func Failed(msg string, args ...interface{})

Failed prints failure message in stderr and exits.

func FormatDate

func FormatDate(d time.Time) string

Format a date to string, return empty if isZero.

func Indent

func Indent(s, indent string) string

func Success

func Success(msg string, args ...interface{})

Success prints success message in stdout.

func TopoSort added in v0.2.0

func TopoSort(nodes map[string]Node) (sorted []string)

topoSort return a list of node sorted.

func Warn

func Warn(msg string, args ...interface{})

Warn prints warning message in stderr.

Types

type Node added in v0.2.0

type Node struct {
	Id             int64
	Name           string
	DownStreamName []string
}

func (Node) ID added in v0.2.0

func (n Node) ID() int64

Jump to

Keyboard shortcuts

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