diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2025-02-16 11:52:23 -0500 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2025-02-16 11:52:23 -0500 |
| commit | 4ba873caba1d725aa72a135e4bd5fc69a9b7ef64 (patch) | |
| tree | 57f7c9646b78dfa13ddfc225a5ae5b1f750ff408 /util.go | |
| parent | 6498718bd0ea27606dc0a4e67d4a966ffe1abfdf (diff) | |
| download | volute-4ba873caba1d725aa72a135e4bd5fc69a9b7ef64.zip | |
microui
Diffstat (limited to 'util.go')
| -rw-r--r-- | util.go | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/util.go b/util.go deleted file mode 100644 index 22f9cb2..0000000 --- a/util.go +++ /dev/null @@ -1,21 +0,0 @@ -package main - -import ( - "fmt" - "os" -) - -func Check(err error) { - if err != nil { - fmt.Println(err) - os.Exit(1) - } -} - -func Insert[T any](slice []T, elem T, i int) []T { - return append(slice[:i], append([]T{elem}, slice[i:]...)...) -} - -func Remove[T any](slice []T, i int) []T { - return append(slice[:i], slice[i+1:]...) -} |