Help us shape the future of Go! Take the 2026 Go Developer Survey

cli

package
v0.1.22 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: AGPL-3.0 Imports: 35 Imported by: 0

Documentation

Overview

Package cli wires the gitdr subcommands (backup, restore, verify, doctor) over the stdlib flag package. Logs go to stderr; machine-readable output goes to stdout.

Index

Constants

This section is empty.

Variables

View Source
var Version = "dev"

Version is set at build time via -ldflags "-X gitdr.io/gitdr/internal/cli.Version=...".

Functions

func Run

func Run(ctx context.Context, args []string) int

Run dispatches a subcommand and returns a process exit code (non-zero on any error).

Types

type WormAnswer added in v0.1.21

type WormAnswer struct {
	// Verdict is the manifest's wormVerdict word for what the store answered, or nil when the
	// check ended in an error instead of an answer.
	Verdict *string `json:"verdict"`
	// Mode is the lock's mode when it is a word gitdr knows, or nil.
	Mode *string `json:"mode"`
	// Code says why the store did not answer the question: its own error code, shaped, or one of
	// the codes errorCode gives a failure that never reached it. Nil when it answered.
	Code *string `json:"code"`
}

WormAnswer is what the worm check found, for a reader that must not parse Detail. Exported only because encoding/json will not fill an unexported embedded pointer when it decodes one.

Jump to

Keyboard shortcuts

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