utils

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractBranchFromRef

func ExtractBranchFromRef(ref string) string

extractBranchFromRef extracts the branch name from a GitHub ref e.g., "refs/heads/main" -> "main"

func GetEnv

func GetEnv(key, fallback string) string

func ParseLogLevel

func ParseLogLevel(level string) (slog.Level, error)

parseLogLevel converts a string to an slog.Level.

func RedactToken

func RedactToken(token string, firstN, lastN int) string

RedactToken redacts a token string for safe logging, preserving only the first and last N characters

func TruncateString

func TruncateString(s string, maxLength int) string

TruncateString truncates a string to the specified length and adds an ellipsis if truncated

Types

This section is empty.

Jump to

Keyboard shortcuts

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