cmd

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2018 License: MIT Imports: 20 Imported by: 1

Documentation

Index

Constants

View Source
const DefaultCloneDepth = -1

DefaultCloneDepth is the number of commits that will be checked out if one is not specified by the invoker of MirrorCat. Most MirrorCat functions will treat negative values as indicative of needing to clone the entire repository. However, at their discretion, they may try to use information local to it to optimize its performance. However, if this value is greater than zero, MirrorCat function implementers are advised to respect it.

View Source
const DefaultPort uint = 8080

DefaultPort is the port that will be used by default as MirrorCat is started.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "mirrorcat",
	Short: "A brief description of your application",
	Long: `A longer description that spans multiple lines and likely contains
examples and usage of using your application. For example:

Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.`,
}

RootCmd represents the base command when called without any subcommands

Functions

func Execute

func Execute()

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 FetchGitHubIdentity added in v0.1.3

func FetchGitHubIdentity(ctx context.Context, token string) (username string, err error)

FetchGitHubIdentity uses the

Types

type WrittenTuple

type WrittenTuple struct {
	Original mirrorcat.RemoteRef `json:"original"`
	Mirror   mirrorcat.RemoteRef `json:"mirror"`
	CommitID string              `json:"commitID"`
}

Jump to

Keyboard shortcuts

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