util

package
v0.0.0-...-69e0da2 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultApiVersion = "v1"
)

Variables

This section is empty.

Functions

func EnvIntOr

func EnvIntOr(name string, def int) int

func EnvOr

func EnvOr(name, def string) string

func Exec

func Exec(command string, arg ...string) error

Exec command

func FilterSlice

func FilterSlice[T any](slices []T, f func(T) bool) []T

func FindSlice

func FindSlice[T any](slices []T, f func(T) bool) (T, bool)

func GenNullPath

func GenNullPath(p string) error

func Go

func Go(command string, path ...string) error

Go exec go command

func ModName

func ModName() string

func Plural

func Plural(s string) string

func Singular

func Singular(s string) string

func Uniq

func Uniq[T comparable](collection []T) []T

func WhiteGo

func WhiteGo(path string, buf []byte) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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