package main import ( "fmt" "os" "strings" "go.jolheiser.com/eget/disk" "go.jolheiser.com/eget/forge" ) var Version = "develop" func main() { if len(os.Args) < 2 { fmt.Println("eget ") return } var f forge.Forger var err error uri := os.Args[1] f, err = forge.NewGitea(uri) if strings.HasPrefix(uri, "github") { f, err = forge.NewGitHub(uri) } if err != nil { panic(err) } asset, err := forge.Latest(f) if err != nil { panic(err) } if err := disk.Install(asset); err != nil { panic(err) } }