https://github.com/tilt-dev/go-get
A repository fetcher, forked from golang/go
https://github.com/tilt-dev/go-get
Last synced: about 1 year ago
JSON representation
A repository fetcher, forked from golang/go
- Host: GitHub
- URL: https://github.com/tilt-dev/go-get
- Owner: tilt-dev
- License: bsd-3-clause
- Created: 2020-09-11T21:10:51.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-10T19:14:21.000Z (over 3 years ago)
- Last Synced: 2025-03-30T04:41:19.627Z (about 1 year ago)
- Language: Go
- Size: 43.9 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-get
A repository fetcher, forked from golang/go
[](https://circleci.com/gh/tilt-dev/go-get)
[](https://pkg.go.dev/github.com/tilt-dev/go-get)
## Why?
### When in doubt, simply port Go's source code, documentation, and tests.
- from *Deno Standard Modules*, https://deno.land/std@0.68.0
[Tilt](https://tilt.dev/) 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.
## How?
```
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)
}
```
## License
Licensed under [3-clause BSD](LICENSE)
Originally Copyright (c) 2009 The Go Authors. All rights reserved.
Modified by Windmill Engineering, Inc.