2020-07-20 10:52:58 +00:00
|
|
|
package main // import "github.com/tweag/gomod2nix"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"flag"
|
|
|
|
"fmt"
|
2020-07-20 11:38:32 +00:00
|
|
|
"github.com/tweag/gomod2nix/fetch"
|
2020-07-20 10:52:58 +00:00
|
|
|
"path/filepath"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
|
|
|
|
flag.Parse()
|
|
|
|
|
2020-07-20 11:29:04 +00:00
|
|
|
numWorkers := 20
|
|
|
|
keepGoing := true
|
2020-07-20 10:52:58 +00:00
|
|
|
directory := "./"
|
|
|
|
|
2020-07-20 11:38:32 +00:00
|
|
|
pkgs, err := fetch.FetchPackages(filepath.Join(directory, "go.mod"), filepath.Join(directory, "go.sum"), numWorkers, keepGoing)
|
2020-07-20 10:52:58 +00:00
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
|
2020-07-20 11:29:04 +00:00
|
|
|
for _, pkg := range pkgs {
|
|
|
|
fmt.Println(pkg)
|
2020-07-20 10:52:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|