Skip to content

How to download a git repository using go-getter? #492

@officialasishkumar

Description

@officialasishkumar

I have currently written a code in golang to download git repository using go-getter but not sure why it's not working. Can someone please help me out?

package main

import (
	"github.com/hashicorp/go-getter"
)

func main() {
	client := &getter.Client{
		Src: "git::https://github.com/kcl-lang/flask-demo-kcl-manifests?refs=ade147b",
		Dst: "/tmp",
		Pwd: "/tmp",
	}
	if err := client.Get(); err != nil {
		panic(err)
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions