A repository fetcher, forked from golang/go
- from Deno Standard Modules, https://deno.land/std@0.68.0
Tilt needs a system for importing extensions.
We love the Go package-import system.
We decided to copy it!
But when we looked at how Go's go get was implemented,
we saw that it supports a lot of different repositories.
This package contains a fork of that package, to make it easier to re-use.
package get_test
import (
"fmt"
"os/user"
"path/filepath"
"testing"
"github.com/tilt-dev/go-get"
)
func ExampleGet(t *testing.T) {
usr, _ := user.Current()
downloader := get.NewDownloader(filepath.Join(usr.HomeDir, ".cache", "go-get"))
path, err := downloader.Download("github.com/tilt-dev/tilt-extensions/hello_world")
if err != nil {
t.Fatal(err)
}
fmt.Printf("Downloaded to %s\n", path)
}
Licensed under 3-clause BSD
Originally Copyright (c) 2009 The Go Authors. All rights reserved.
Modified by Windmill Engineering, Inc.