Documentation
¶
Index ¶
Constants ¶
View Source
const (
// AppDataDirName is the cache directory name under the platform-specific data root.
AppDataDirName = "licenser"
)
Variables ¶
This section is empty.
Functions ¶
func DataDir ¶
DataDir returns the directory where licenser stores cached license data. Uses XDG_DATA_HOME/licenser if set, otherwise platform-specific defaults.
func EnsureData ¶
EnsureData checks if cached data exists and is fresh. If not, it fetches license data from GitHub. Returns the cache directory path.
func FetchLicenses ¶
FetchLicenses downloads license data from the GitHub choosealicense.com repo.
func LicenseCount ¶
LicenseCount returns the number of .txt files in the cache directory.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.