MCPcopy
hub / github.com/cheat/cheat / Clone

Function Clone

internal/repo/clone.go:12–26  ·  view source on GitHub ↗

Clone clones the community cheatsheets repository to the specified directory

(dir string)

Source from the content-addressed store, hash-verified

10
11// Clone clones the community cheatsheets repository to the specified directory
12func Clone(dir string) error {
13
14 // clone the community cheatsheets
15 _, err := git.PlainClone(dir, false, &git.CloneOptions{
16 URL: "https://github.com/cheat/cheatsheets.git",
17 Depth: 1,
18 Progress: os.Stdout,
19 })
20
21 if err != nil {
22 return fmt.Errorf("failed to clone cheatsheets: %v", err)
23 }
24
25 return nil
26}

Callers 3

RunFunction · 0.92
TestCloneIntegrationFunction · 0.85
TestCloneFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestCloneIntegrationFunction · 0.68
TestCloneFunction · 0.68