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

clone

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package clone implements the repo clone command

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdClone

func NewCmdClone(f *cmdutil.Factory, runF func(*CloneOptions) error) *cobra.Command

NewCmdClone creates the clone command

Types

type CloneOptions

type CloneOptions struct {
	IO         *iostreams.IOStreams
	HttpClient func() (*http.Client, error)
	Config     func() (config.Config, error)

	// GitClone executes the git clone command. Injected by tests.
	GitClone func(gitArgs []string, opts *CloneOptions) error

	// Arguments
	Repository string
	Directory  string

	// Flags
	GitProtocol string
	Depth       int
	Branch      string
	Recursive   bool
}

Source Files

  • clone.go

Jump to

Keyboard shortcuts

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