util

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 6 Imported by: 12

Documentation

Overview

Package util contains utility functions.

Package util contains utility functions for working with strings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeDupeStrSlice added in v0.0.47

func DeDupeStrSlice(ss []string) []string

DeDupeStrSlice deduplicates a slices of strings

func Gzip added in v0.0.46

func Gzip(input, output string) error

Gzip compresses a file using gzip and writes the result to disk

func Ptr

func Ptr[T any](x T) *T

Ptr returns a pointer to any arbitrary variable.

func Sanitize added in v0.0.47

func Sanitize(s string) string

Sanitize sends a string to lowercase, trims whitespace, replaces all non alphanumeric characters with a dash, removes consecutive dashes, and trims any leading or trailing dashes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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