cmd

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package cmd implements the command-line interface for Furca.

It provides commands for synchronizing GitHub forks with their upstream repositories, as well as utility functions for configuration management and command execution.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() error

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func SetVersionInfo added in v0.2.0

func SetVersionInfo(v, c, d string)

SetVersionInfo sets the version information for Furca. It takes the version string, commit hash, and build date as parameters, which are typically set during the build process via ldflags.

Types

type SyncResult

type SyncResult struct {
	Name   string `json:"name"`
	Status string `json:"status"`
	Error  string `json:"error,omitempty"`
	Behind int    `json:"behind_by,omitempty"`
}

SyncResult represents the result of a sync operation for a single repository. It contains information about the repository name, sync status, any errors encountered, and how many commits the repository is behind its upstream.

type SyncSummary

type SyncSummary struct {
	Synced    []string          `json:"synced"`
	UpToDate  []string          `json:"up_to_date"`
	Errors    map[string]string `json:"errors"`
	Timestamp string            `json:"timestamp"`
}

SyncSummary represents the summary of all sync operations performed. It contains lists of repositories that were synced, up-to-date, and encountered errors, as well as a timestamp of when the sync operation was performed.

Jump to

Keyboard shortcuts

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