util

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UNKNOWN = "unknown"
)

Variables

This section is empty.

Functions

func ConcatStrings

func ConcatStrings(items ...string) string

ConcatStrings concatenate strings in a larger one. This function addresses a very specific ghw use case. For a more general approach, just use strings.Join()

func SafeClose

func SafeClose(c closer)

func SafeIntFromFile

func SafeIntFromFile(ctx *context.Context, path string) int

Reads a supplied filepath and converts the contents to an integer. Returns -1 if there were file permissions or existence errors or if the contents could not be successfully converted to an integer. In any error, a warning message is printed to STDERR and -1 is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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