defaultconfig

package
v0.1.3-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 10 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 defaultconfig is the copy of the repository's config/ built into the binary, used when it runs outside any checkout (a standalone binary, double-clicked from Downloads). It is read-only: the web UI refuses to save into it and points at --config-dir instead.

The copy is generated, never edited: change config/, then run `make embed-config`. TestEmbeddedConfigMatchesTheRepository fails while the two differ.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Diff

func Diff(src string) ([]string, error)

Diff lists how src differs from the embedded copy: files missing from either side, and files whose bytes differ. Empty means in step.

func Dir

func Dir(base string) (string, error)

Dir writes the embedded configs to a per-user cache directory and returns it, so every reader that takes a directory works unchanged. The directory is named for a hash of the contents and its files are mode 0444; an existing copy is checked byte for byte and rewritten where it differs. base is the cache root; "" means $XDG_CACHE_HOME, else ~/.cache.

func FS

func FS() fs.FS

FS is the embedded config tree, rooted at the config directory.

func Files

func Files() []string

Files lists the embedded files, slash-separated and sorted.

func Sync

func Sync(src, dest string) (int, error)

Sync makes dest an exact copy of src's files, removing any it no longer has, and returns how many it holds.

Types

This section is empty.

Jump to

Keyboard shortcuts

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