Clone clones the community cheatsheets repository to the specified directory
(dir string)
| 10 | |
| 11 | // Clone clones the community cheatsheets repository to the specified directory |
| 12 | func 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 | } |
no outgoing calls