channel

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: Apache-2.0 Imports: 8 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 channel holds what the Homebrew and Scoop channel tools share (Story 4.4): release version rules, archive names and download URLs, checksums.txt parsing and the Scoop manifest renderer. Hashes always come from the signed checksums.txt.

Problems are returned as plain message strings ("" means none), not errors, so the tools never print error text (AD-3).

Index

Constants

View Source
const (
	Description = "Find the AI keys your coding agents have spread and see which are live"
	Homepage    = "https://github.com/aiagentpro/tokenhound"
	License     = "Apache-2.0"
)

Metadata both channels must carry; .goreleaser.yaml (homebrew_casks) and dist/scoop/tokenhound.json.tmpl hold the same values.

View Source
const Project = "tokenhound"

Project is the GoReleaser project name and archive prefix.

View Source
const ReleaseBase = "https://github.com/aiagentpro/tokenhound/releases/download"

ReleaseBase is the GitHub Releases download prefix; the tag is "v" + version. It matches the homebrew_casks url template in .goreleaser.yaml.

Variables

View Source
var ScoopKeys = []string{"architecture", "bin", "description", "homepage", "license", "version"}

ScoopKeys are the only top-level keys a Scoop manifest may hold.

View Source
var ScoopTargets = map[string]string{"64bit": "amd64", "arm64": "arm64"}

ScoopTargets maps the Scoop architecture keys to Go architectures.

Functions

func Archive

func Archive(version, goos, goarch string) string

Archive returns the GoReleaser archive name for one target.

func CheckVersion

func CheckVersion(v string) string

CheckVersion returns a problem unless v is a release version X.Y.Z (optionally with a pre-release or build suffix) without a leading "v".

func ParseChecksums

func ParseChecksums(data []byte) (map[string]string, string)

ParseChecksums reads a GoReleaser checksums.txt ("<sha256> <name>" per line).

func RenderScoop

func RenderScoop(tmplText, version string, sums map[string]string) ([]byte, string)

RenderScoop renders the Scoop manifest template for version from the checksums. It fails naming the archive when a windows archive is missing from checksums, and when the result is not a JSON object with exactly the allowed keys.

func URL

func URL(version, archive string) string

URL returns the release download URL of an archive.

Types

type ScoopData

type ScoopData struct {
	Version string
	AMD64   Target
	ARM64   Target
}

ScoopData is what dist/scoop/tokenhound.json.tmpl receives.

type Target

type Target struct {
	URL  string
	Hash string
}

Target is one Scoop architecture entry.

Jump to

Keyboard shortcuts

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