18 lines
276 B
Go
18 lines
276 B
Go
package git
|
|
|
|
import (
|
|
"context"
|
|
"os/exec"
|
|
)
|
|
|
|
type Provider struct {
|
|
}
|
|
|
|
func New() *Provider {
|
|
return &Provider{}
|
|
}
|
|
|
|
func (p *Provider) Clone(ctx context.Context, url string, targetDir string) error {
|
|
return exec.CommandContext(ctx, "git", "clone", url, targetDir).Run()
|
|
}
|