utils

package
v0.3.12 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RepoUrl = "https://github.com/github/gitignore"

Functions

func Contains

func Contains[T comparable](list []T, item T) bool

func FileExists

func FileExists(path string) bool

func GlobExists

func GlobExists(path string) bool

func HandleErr

func HandleErr(err error)

func HandleFileOverwrite

func HandleFileOverwrite(path string, contents string, selection string)

func Insert

func Insert[T any](a []T, i int, item T) []T

func KeyInterrupt

func KeyInterrupt()

func Quit

func Quit(message string)

func ReadFile

func ReadFile(path string) string

func RunCmd

func RunCmd(cmd string, args ...string) (string, error)

func Ternary

func Ternary[T any](cond bool, whenTrue T, whenFalse T) T

func ToString

func ToString[T any](obj T) string

func WriteFile

func WriteFile(path string, data string, overwrite bool) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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