config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: GPL-3.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package config resolves the on-disk locations and runtime settings used by the bob-mdict service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// DictionaryDir is scanned recursively for .mdx files.
	DictionaryDir string
	// CacheDir holds transcoded audio and other derived artifacts.
	CacheDir string
	// Port is the loopback TCP port to listen on.
	Port int
	// Debug enables verbose logging and the debug lookup fields.
	Debug bool
}

Config holds everything the service needs to start.

func Default

func Default() Config

Default builds a Config from environment overrides, falling back to the standard macOS Application Support layout.

func (Config) EnsureDirs

func (c Config) EnsureDirs() error

EnsureDirs creates the dictionary and cache directories if they are missing, so a fresh install has somewhere for the user to drop dictionaries.

Jump to

Keyboard shortcuts

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