goutils

package module
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: MIT Imports: 5 Imported by: 0

README

goUtils

Helper functions for go.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetReader

func GetReader() (io.ReadCloser, error)

GetReader checks the CLI arguments provided to the program. If no argument is provided or if the first argument is "-", it returns os.Stdin. Otherwise, it attempts to open the file path provided in the first argument.

The caller is responsible for calling .Close() on the returned io.ReadCloser.

func Is_palindrome added in v0.2.0

func Is_palindrome(input string) bool

check if a string is a palindrome

func Md5Hash added in v0.2.0

func Md5Hash(str string) string

return the md5hash of a string

func NewQueue added in v0.2.0

func NewQueue[T any]() *queue[T]

NewQueue creates a new empty Queue for type T

Example Usage:
q := NewQueue[int]()
q.Enqueue(5)

func ToInt added in v0.2.0

func ToInt(s string) int

Convert a string to int Panic if not possible

Types

This section is empty.

Directories

Path Synopsis
Provides functions to print colored logs.
Provides functions to print colored logs.

Jump to

Keyboard shortcuts

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