mode

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: Apache-2.0, BSD-3-Clause, MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromEnv

func FromEnv()

FromEnv sets mode and debug from environment variables Per AI.md PART 6: Mode and Debug Detection Priority

func GetAppModeString

func GetAppModeString() string

GetAppModeString returns mode string with debug suffix if enabled

func IsAppModeDev

func IsAppModeDev() bool

IsAppModeDev returns true if in development mode Per AI.md PART 1: Intent-revealing names required

func IsAppModeProd

func IsAppModeProd() bool

IsAppModeProd returns true if in production mode Per AI.md PART 1: Intent-revealing names required

func IsDebugEnabled

func IsDebugEnabled() bool

IsDebugEnabled returns true if debug mode is enabled (--debug or DEBUG=true) Per AI.md PART 6: Debug Flag

func SetAppMode

func SetAppMode(m string)

SetAppMode sets the application mode Per AI.md PART 6: Mode shortcuts (dev/development, prod/production)

func SetDebugEnabled

func SetDebugEnabled(enabled bool)

SetDebugEnabled enables or disables debug mode Per AI.md PART 6: Debug Flag

Types

type AppMode

type AppMode int

AppMode represents the application operational mode Per AI.md PART 6: Application Modes

const (
	Production AppMode = iota
	Development
)

func GetCurrentAppMode

func GetCurrentAppMode() AppMode

GetCurrentAppMode returns the current application mode

func (AppMode) String

func (m AppMode) String() string

Jump to

Keyboard shortcuts

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