Change import paths
Signed-off-by: jolheiser <john.olheiser@gmail.com>pull/1/head v0.1.0
parent
4d536f3ca0
commit
2ad783017a
2
Makefile
2
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:
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
|
|
@ -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{
|
||||
|
|
|
@ -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{
|
||||
|
|
|
@ -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{
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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{
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
4
go.mod
4
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
|
||||
)
|
||||
|
|
6
go.sum
6
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=
|
||||
|
|
6
main.go
6
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"
|
||||
)
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue