utils

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package utils ...

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFloats

func ReadFloats(path string) ([]float64, error)

ReadInts reads a list of integers from a file.

func ReadInts

func ReadInts(path string) ([]int, error)

ReadInts reads a list of integers from a file.

func ReadObject

func ReadObject[T any](path string) (T, error)

ReadObject reads a json serialized object from a file.

func ReadString

func ReadString(path string) (string, error)

ReadString reads a string from a file.

func WriteFloats

func WriteFloats(path string, floats []float64) error

WriteFloats writes a list of float64s to a file.

func WriteInts

func WriteInts(path string, ints []int) error

WriteInts writes a list of integers to a file.

func WriteObject

func WriteObject(path string, obj any) error

WriteObject writes an object to a file as json.

func WriteString

func WriteString(path, value string) error

WriteString writes a string to a file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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