util

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 3, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package util provides common utility functions for string manipulation and environment variables.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnv

func GetEnv(key, fallback string) string

GetEnv retrieves the value of the environment variable with a fallback value.

func NormalizeHostname

func NormalizeHostname(value string) string

NormalizeHostname lowercases and trims whitespace and trailing dots from a hostname.

func ParseQuotedValues

func ParseQuotedValues(input string) []string

ParseQuotedValues extracts values enclosed in single quotes, double quotes, or backticks.

func SplitCSV

func SplitCSV(val string) []string

SplitCSV splits a comma-separated string into a slice of trimmed strings, ignoring empty values.

func WithDot

func WithDot(s string) string

WithDot ensures a string ends with a trailing dot.

Types

This section is empty.

Jump to

Keyboard shortcuts

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