config

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package config provides configuration logic and constants for the application.

Index

Constants

View Source
const (
	// ProductName is the human-readable name of the application.
	ProductName = "typomat"
	// AppCommandName is the command-line name of the application.
	AppName = "typomat"
)

Variables

View Source
var (
	// ErrInit indicates a failure to initialize the app configuration.
	ErrInit = errors.New("failed to initialize configuration directory")
	// ErrCleanup indicates a failure to clean up old files.
	ErrCleanup = errors.New("failed to clean configuration directory")
)

Functions

func AppDir

func AppDir() string

AppDir returns the application directory path.

func DbDir

func DbDir() string

DbDir returns the directory path where database files are stored.

func Init

func Init() error

Init initializes the configuration by setting up necessary directories and configuring the logger.

func PurgeCache

func PurgeCache() error

PurgeCache deletes all cached data stored in the database directory.

func RemoveOldFiles

func RemoveOldFiles() error

RemoveOldFiles removes files in the application directory that are older than a week.

Types

This section is empty.

Jump to

Keyboard shortcuts

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