Compare commits
6 Commits
ef4c683ed1
...
afa0b4d856
Author | SHA1 | Date | |
---|---|---|---|
|
afa0b4d856 | ||
|
00c3f07135 | ||
|
6000a0ce74 | ||
|
17b53c59fd | ||
|
e04550fc2f | ||
|
7415af0dd2 |
4
.gitignore
vendored
4
.gitignore
vendored
@ -6,7 +6,9 @@
|
|||||||
*.so
|
*.so
|
||||||
*.dylib
|
*.dylib
|
||||||
|
|
||||||
r2go
|
.vscode
|
||||||
|
|
||||||
|
risk
|
||||||
main
|
main
|
||||||
|
|
||||||
# Test binary, built with `go test -c`
|
# Test binary, built with `go test -c`
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# r2mod-go
|
# risk
|
||||||
risk of rain 2 mod updater/manager/installer/uninstaller/lister/searcher/info-getter
|
risk of rain 2 mod updater/manager/installer/uninstaller/lister/searcher/info-getter
|
||||||
|
|
||||||
# how to use
|
# how to use
|
||||||
@ -7,6 +7,9 @@ risk of rain 2 mod updater/manager/installer/uninstaller/lister/searcher/info-ge
|
|||||||
- use
|
- use
|
||||||
- or get from releases
|
- or get from releases
|
||||||
|
|
||||||
|
# Q: does this work as a go module?
|
||||||
|
A: no
|
||||||
|
|
||||||
## currently implemented
|
## currently implemented
|
||||||
- downloading
|
- downloading
|
||||||
- info getting
|
- info getting
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"r2go/utils"
|
"risk/utils"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/lithammer/fuzzysearch/fuzzy"
|
"github.com/lithammer/fuzzysearch/fuzzy"
|
||||||
|
@ -2,8 +2,8 @@ package cli
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"r2go/tools"
|
"risk/tools"
|
||||||
"r2go/utils"
|
"risk/utils"
|
||||||
|
|
||||||
"github.com/fatih/color"
|
"github.com/fatih/color"
|
||||||
)
|
)
|
||||||
@ -29,7 +29,7 @@ func InstallMod(pkg string) {
|
|||||||
buffer += blue("downloaded")
|
buffer += blue("downloaded")
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println(deps)
|
// fmt.Println(deps)
|
||||||
dependencies := []string{}
|
dependencies := []string{}
|
||||||
for _, d := range deps {
|
for _, d := range deps {
|
||||||
dependency := tools.ExposeModString(d)
|
dependency := tools.ExposeModString(d)
|
||||||
|
16
main.go
16
main.go
@ -5,10 +5,10 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"r2go/api"
|
"risk/api"
|
||||||
"r2go/cli"
|
"risk/cli"
|
||||||
"r2go/tools"
|
"risk/tools"
|
||||||
"r2go/utils"
|
"risk/utils"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/fatih/color"
|
"github.com/fatih/color"
|
||||||
@ -16,7 +16,7 @@ import (
|
|||||||
|
|
||||||
var version string = "0.0.1"
|
var version string = "0.0.1"
|
||||||
|
|
||||||
// Init starts the CLI frontend for r2go
|
// Init starts the CLI frontend for risk
|
||||||
func main() {
|
func main() {
|
||||||
logFile, err := os.OpenFile(utils.SystemInfo.ProgDir+"/r2mod-go.log", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0644)
|
logFile, err := os.OpenFile(utils.SystemInfo.ProgDir+"/r2mod-go.log", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0644)
|
||||||
utils.CheckErr(err)
|
utils.CheckErr(err)
|
||||||
@ -54,7 +54,7 @@ func main() {
|
|||||||
case "info":
|
case "info":
|
||||||
api.InitAPI()
|
api.InitAPI()
|
||||||
if len(os.Args) <= 2 {
|
if len(os.Args) <= 2 {
|
||||||
fmt.Println("Usage: r2go info <dependency string>")
|
fmt.Println("Usage: risk info <dependency string>")
|
||||||
} else {
|
} else {
|
||||||
status, selectedmod := api.GetModData(os.Args[2])
|
status, selectedmod := api.GetModData(os.Args[2])
|
||||||
if status != 0 {
|
if status != 0 {
|
||||||
@ -131,7 +131,7 @@ func main() {
|
|||||||
case "filter":
|
case "filter":
|
||||||
fmt.Println(tools.ExposeModString(os.Args[2]))
|
fmt.Println(tools.ExposeModString(os.Args[2]))
|
||||||
case "version", "ver", "v":
|
case "version", "ver", "v":
|
||||||
color.Magenta("> r2go", version)
|
color.Magenta("> risk", version)
|
||||||
fmt.Println(" > github.com/endigma442")
|
fmt.Println(" > github.com/endigma442")
|
||||||
case "search", "s", "find":
|
case "search", "s", "find":
|
||||||
api.InitAPI()
|
api.InitAPI()
|
||||||
@ -147,6 +147,6 @@ func main() {
|
|||||||
}
|
}
|
||||||
color.Green("> Complete!")
|
color.Green("> Complete!")
|
||||||
default:
|
default:
|
||||||
fmt.Println("Unknown command, use 'r2go help' for a list of commands.")
|
fmt.Println("Unknown command, use 'risk help' for a list of commands.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,9 +4,9 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"r2go/api"
|
|
||||||
"r2go/utils"
|
|
||||||
"regexp"
|
"regexp"
|
||||||
|
"risk/api"
|
||||||
|
"risk/utils"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user