utils

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ProjectName = "Go-MMP"

Variables

This section is empty.

Functions

func CheckFileExists

func CheckFileExists(path string) bool

CheckFileExists will check if file is there, and is readable Returns a bool with the answer

func CopyFile

func CopyFile(src, dest string) error

CopyFile will copy a file from src to dest. Returns an error if one occurs

func SliceContains

func SliceContains[T comparable](slic *[]T, item T) (index int, isFound bool)

Return index of match, isFound if a value in in a slice If there's no match, index is -1

func StringToInt

func StringToInt(s string) (int, error)

Convert a string to an integer, if possible. If not, return an error

Types

type ErrCannotParseIntFromEmptyString

type ErrCannotParseIntFromEmptyString struct{}

Errors

func (ErrCannotParseIntFromEmptyString) Error

Jump to

Keyboard shortcuts

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