env

package
v0.12.7 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package env holds the process-wide environment-variable prefix shared by clog's packages, and the "custom prefix first, then CLOG" lookup built on it. Root clog and the theme package both delegate here so the prefix can never desync between them.

Index

Constants

View Source
const DefaultPrefix = "CLOG"

DefaultPrefix is the fallback environment variable prefix.

Variables

This section is empty.

Functions

func Lookup

func Lookup(suffix string) (string, string)

Lookup reads the environment variable for suffix, checking the custom prefix first and falling back to DefaultPrefix. It returns the value and the name of the variable it came from (the fallback name when neither is set), so callers can reference the right variable in error messages.

func Prefix

func Prefix() string

Prefix returns the current custom prefix ("" when unset).

func SetPrefix

func SetPrefix(p string)

SetPrefix sets the custom environment-variable prefix, trimming trailing underscores. Pass "" to restore the default-only lookup.

Types

This section is empty.

Jump to

Keyboard shortcuts

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