global

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: MIT Imports: 8 Imported by: 2

Documentation

Overview

Package global

Package global

Package global

Index

Constants

View Source
const (
	BeginYear = 2025

	DefaultFilePermissions     = 0644
	DefaultDirectoryPermission = 0755

	LogName = "MAIN"

	EnvNoLogs         = "NO_LOGS"
	EnvConfigFilePath = "CONFIG_FILE_PATH"
)

Variables

View Source
var (
	NoLogs         = flag.Bool("no_logs", false, "Disable logging to file")
	ConfigFilePath = flag.String("config", "./config.yaml", "Path to configuration file")
)

Functions

func CheckBoolEnv

func CheckBoolEnv(envKey string, target *bool)

func CheckDurationEnv

func CheckDurationEnv(envKey string, target *time.Duration)

func CheckIntEnv

func CheckIntEnv(envKey string, target *int, defaultValue int)

func CheckStringEnv

func CheckStringEnv(envKey string, target *string)

Types

type Callable

type Callable interface {
	Invoke(ctx context.Context) error
}

type CheckVersionResult

type CheckVersionResult int
const (
	AllMatch CheckVersionResult = iota
	MajorUnmatch
	MinorUnmatch
	PatchUnmatch
)

type Version

type Version struct {
	// contains filtered or unexported fields
}

func NewVersion

func NewVersion(version string) (*Version, error)

func (*Version) CheckVersion

func (v *Version) CheckVersion(version *Version) CheckVersionResult

func (*Version) String

func (v *Version) String() string

Jump to

Keyboard shortcuts

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