config

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 7 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 issue-tracker settings from the XDG config file and environment variables, with the environment taking precedence.

Index

Constants

View Source
const (

	// RepoEnv names the tracker repository as owner/name.
	RepoEnv = "ISSUE_TRACKER_REPO"
	// StaleDaysEnv sets the days without activity before Doing tickets are stale.
	StaleDaysEnv = "ISSUE_TRACKER_STALE_DAYS"
	// RequirePrivateEnv makes commands refuse a tracker that is not private.
	RequirePrivateEnv = "ISSUE_TRACKER_REQUIRE_PRIVATE"
)

Variables

This section is empty.

Functions

func CacheDir

func CacheDir() (string, error)

CacheDir returns the directory for the metadata cache and pulled attachments. It uses ~/.cache rather than os.UserCacheDir so every platform shares one path.

Types

type Config

type Config struct {
	Repo           string `toml:"repo"`
	StaleDays      int    `toml:"stale_days"`
	RequirePrivate bool   `toml:"require_private"`
}

Config holds resolved settings.

func Load

func Load() (Config, error)

Load reads the config file when it exists, then applies the environment.

Jump to

Keyboard shortcuts

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