utils

package
v0.13.6 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool2Int

func Bool2Int(b bool) int

func Clamp

func Clamp(min int, n, max int) int

func DirExists

func DirExists(path string) bool

func EndsWith

func EndsWith(string string, substrings []string) bool

func FileExists

func FileExists(path string) bool

func GoldenTest

func GoldenTest(t *testing.T, file string, content string)

func InArray

func InArray[T comparable](value T, array []T) bool

func Merge

func Merge[T any](acc map[string]T, maps ...map[string]T) map[string]T

func PrefixN

func PrefixN(str string, char rune) int

Types

type Vector

type Vector struct {
	X int
	Y int
}

func Vec

func Vec(x int, y int) Vector

func (*Vector) Minus

func (v *Vector) Minus(other Vector) Vector

Jump to

Keyboard shortcuts

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