diff --git a/Makefile b/Makefile index 7f9e03e..ba99758 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ else LONG_VERSION ?= $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//') endif -LDFLAGS := $(LDFLAGS) -X "gitea.com/jolheiser/gpm/modules/config.Version=$(LONG_VERSION)" +LDFLAGS := $(LDFLAGS) -X "go.jolheiser.com/gpm/modules/config.Version=$(LONG_VERSION)" .PHONY: build build: diff --git a/cmd/add.go b/cmd/add.go index f4f2344..bece38d 100644 --- a/cmd/add.go +++ b/cmd/add.go @@ -1,10 +1,10 @@ package cmd import ( - "gitea.com/jolheiser/beaver" - "gitea.com/jolheiser/gpm/modules/config" "github.com/AlecAivazis/survey/v2" "github.com/urfave/cli/v2" + "go.jolheiser.com/beaver" + "go.jolheiser.com/gpm/modules/config" "regexp" "strings" ) diff --git a/cmd/cmd.go b/cmd/cmd.go index f201987..95c25c7 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -1,8 +1,8 @@ package cmd import ( - "gitea.com/jolheiser/gpm/modules/config" "github.com/urfave/cli/v2" + "go.jolheiser.com/gpm/modules/config" ) var Flags = []cli.Flag{ diff --git a/cmd/config.go b/cmd/config.go index f41cf7a..513b32d 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -1,10 +1,10 @@ package cmd import ( - "gitea.com/jolheiser/beaver" - "gitea.com/jolheiser/gpm/modules/config" "github.com/AlecAivazis/survey/v2" "github.com/urfave/cli/v2" + "go.jolheiser.com/beaver" + "go.jolheiser.com/gpm/modules/config" ) var Config = cli.Command{ diff --git a/cmd/export.go b/cmd/export.go index 8c1ab7c..2366c0b 100644 --- a/cmd/export.go +++ b/cmd/export.go @@ -2,8 +2,8 @@ package cmd import ( "fmt" - "gitea.com/jolheiser/gpm/modules/config" "github.com/urfave/cli/v2" + "go.jolheiser.com/gpm/modules/config" ) var Export = cli.Command{ diff --git a/cmd/get.go b/cmd/get.go index fe02696..f9a5373 100644 --- a/cmd/get.go +++ b/cmd/get.go @@ -3,10 +3,10 @@ package cmd import ( "encoding/json" "fmt" - "gitea.com/jolheiser/beaver" - "gitea.com/jolheiser/gpm/modules/config" "github.com/AlecAivazis/survey/v2" "github.com/urfave/cli/v2" + "go.jolheiser.com/beaver" + "go.jolheiser.com/gpm/modules/config" "io/ioutil" "net/http" "os" diff --git a/cmd/import.go b/cmd/import.go index 965a0cd..8cd3f52 100644 --- a/cmd/import.go +++ b/cmd/import.go @@ -3,9 +3,9 @@ package cmd import ( "encoding/json" "errors" - "gitea.com/jolheiser/beaver" - "gitea.com/jolheiser/gpm/modules/config" "github.com/urfave/cli/v2" + "go.jolheiser.com/beaver" + "go.jolheiser.com/gpm/modules/config" "io/ioutil" "net/http" "strings" diff --git a/cmd/list.go b/cmd/list.go index ca3bc06..87c1331 100644 --- a/cmd/list.go +++ b/cmd/list.go @@ -1,9 +1,9 @@ package cmd import ( - "gitea.com/jolheiser/beaver" - "gitea.com/jolheiser/gpm/modules/config" "github.com/urfave/cli/v2" + "go.jolheiser.com/beaver" + "go.jolheiser.com/gpm/modules/config" ) var List = cli.Command{ diff --git a/cmd/remove.go b/cmd/remove.go index 80b5b93..79c18b8 100644 --- a/cmd/remove.go +++ b/cmd/remove.go @@ -2,10 +2,10 @@ package cmd import ( "fmt" - "gitea.com/jolheiser/beaver" - "gitea.com/jolheiser/gpm/modules/config" "github.com/AlecAivazis/survey/v2" "github.com/urfave/cli/v2" + "go.jolheiser.com/beaver" + "go.jolheiser.com/gpm/modules/config" "strings" ) diff --git a/cmd/server.go b/cmd/server.go index cd3d660..e24ffcf 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -2,9 +2,9 @@ package cmd import ( "fmt" - "gitea.com/jolheiser/beaver" - "gitea.com/jolheiser/gpm/modules/router" "github.com/urfave/cli/v2" + "go.jolheiser.com/beaver" + "go.jolheiser.com/gpm/modules/router" "net/http" ) diff --git a/go.mod b/go.mod index 768eaf3..b69925b 100644 --- a/go.mod +++ b/go.mod @@ -1,12 +1,12 @@ -module gitea.com/jolheiser/gpm +module go.jolheiser.com/gpm go 1.13 require ( - gitea.com/jolheiser/beaver v1.0.0 github.com/AlecAivazis/survey/v2 v2.0.5 github.com/BurntSushi/toml v0.3.1 github.com/go-chi/chi v4.0.3+incompatible github.com/mitchellh/go-homedir v1.1.0 github.com/urfave/cli/v2 v2.1.1 + go.jolheiser.com/beaver v1.0.1 ) diff --git a/go.sum b/go.sum index e9ee2c5..333fa82 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,3 @@ -gitea.com/jolheiser/beaver v1.0.0 h1:IfNMhp7+DUaM0kaNwho4RWfuebCsa8A/kxtZBngFjHk= -gitea.com/jolheiser/beaver v1.0.0/go.mod h1:2mUGl6ZGKY/Y9u36iR4bqOPrHhr4C22cxkR8ei2G06I= github.com/AlecAivazis/survey/v2 v2.0.5 h1:xpZp+Q55wi5C7Iaze+40onHnEkex1jSc34CltJjOoPM= github.com/AlecAivazis/survey/v2 v2.0.5/go.mod h1:WYBhg6f0y/fNYUuesWQc0PKbJcEliGcYHB9sNT3Bg74= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= @@ -36,9 +34,12 @@ github.com/stretchr/testify v1.2.1 h1:52QO5WkIUcHGIR7EnGagH88x1bUzqGXTC5/1bDTUQ7 github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/urfave/cli/v2 v2.1.1 h1:Qt8FeAtxE/vfdrLmR3rxR6JRE0RoVmbXu8+6kZtYU4k= github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= +go.jolheiser.com/beaver v1.0.1 h1:gt3aGEr5Bj4ZjDF1g8t8OYOGRCRXGaanGR9CmXUxez8= +go.jolheiser.com/beaver v1.0.1/go.mod h1:7X4F5+XOGSC3LejTShoBdqtRCnPWcnRgmYGmG3EKW8g= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5 h1:8dUaAV7K4uHsF56JQWkprecIQKdPHtR9jCHF5nB8uzc= golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -46,6 +47,7 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190530182044-ad28b68e88f1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a h1:aYOabOQFp6Vj6W1F80affTUvO9UxmJRx8K0gsfABByQ= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/main.go b/main.go index 0e865a4..12e1501 100644 --- a/main.go +++ b/main.go @@ -1,10 +1,10 @@ package main import ( - "gitea.com/jolheiser/beaver" - "gitea.com/jolheiser/gpm/cmd" - "gitea.com/jolheiser/gpm/modules/config" "github.com/urfave/cli/v2" + "go.jolheiser.com/beaver" + "go.jolheiser.com/gpm/cmd" + "go.jolheiser.com/gpm/modules/config" "os" ) diff --git a/modules/config/config.go b/modules/config/config.go index c28b05b..94246e5 100644 --- a/modules/config/config.go +++ b/modules/config/config.go @@ -3,10 +3,10 @@ package config import ( "encoding/json" "fmt" - "gitea.com/jolheiser/beaver" "github.com/AlecAivazis/survey/v2" "github.com/BurntSushi/toml" "github.com/mitchellh/go-homedir" + "go.jolheiser.com/beaver" "os" "path" "strings" diff --git a/modules/router/router.go b/modules/router/router.go index 82cd122..bc6942b 100644 --- a/modules/router/router.go +++ b/modules/router/router.go @@ -2,10 +2,10 @@ package router import ( "encoding/json" - "gitea.com/jolheiser/beaver" - "gitea.com/jolheiser/gpm/modules/config" "github.com/go-chi/chi" "github.com/go-chi/chi/middleware" + "go.jolheiser.com/beaver" + "go.jolheiser.com/gpm/modules/config" "net/http" "time" ) @@ -18,7 +18,7 @@ func Init() *chi.Mux { r.Use(middleware.Recoverer) r.Use(middleware.Timeout(30 * time.Second)) - r.Get("/status", handleStatus) + r.Get("/", handleHome) r.Get("/export", handleExport) r.Get("/package/{name}", handlePackage) @@ -27,7 +27,7 @@ func Init() *chi.Mux { return r } -func handleStatus(res http.ResponseWriter, _ *http.Request) { +func handleHome(res http.ResponseWriter, _ *http.Request) { status, err := json.Marshal(map[string]interface{}{ "version": config.Version, "packages": len(config.Packages),