feat: change package for fork

This commit is contained in:
Georg K 2022-03-03 02:08:22 +03:00
parent 68959a741a
commit d4916fc30d
6 changed files with 26 additions and 11 deletions

View File

@ -16,7 +16,7 @@ import (
"time" "time"
"unicode" "unicode"
"github.com/bilus/gomodproxy/pkg/api" "gitlab.connectone.pro/github/gomodproxy/pkg/api"
"expvar" "expvar"
_ "net/http/pprof" _ "net/http/pprof"
@ -103,7 +103,7 @@ func main() {
verbose := flag.Bool("v", false, "verbose logging") verbose := flag.Bool("v", false, "verbose logging")
prometheus := flag.String("prometheus", "", "prometheus address") prometheus := flag.String("prometheus", "", "prometheus address")
debug := flag.Bool("debug", false, "enable debug HTTP API (pprof/expvar)") debug := flag.Bool("debug", false, "enable debug HTTP API (pprof/expvar)")
json := flag.Bool("json", false, "json structured logging") useJsonLog := flag.Bool("json", false, "json structured logging")
dir := flag.String("dir", filepath.Join(os.Getenv("HOME"), ".gomodproxy/cache"), "modules cache directory") dir := flag.String("dir", filepath.Join(os.Getenv("HOME"), ".gomodproxy/cache"), "modules cache directory")
gitdir := flag.String("gitdir", filepath.Join(os.Getenv("HOME"), ".gomodproxy/git"), "git cache directory") gitdir := flag.String("gitdir", filepath.Join(os.Getenv("HOME"), ".gomodproxy/git"), "git cache directory")
memLimit := flag.Int64("mem", 256, "in-memory cache size in MB") memLimit := flag.Int64("mem", 256, "in-memory cache size in MB")
@ -123,8 +123,8 @@ func main() {
options := []api.Option{} options := []api.Option{}
logger := func(...interface{}) {} logger := func(...interface{}) {}
if *verbose || *json { if *verbose || *useJsonLog {
if *json { if *useJsonLog {
logger = jsonLog logger = jsonLog
} else { } else {
logger = prettyLog logger = prettyLog

19
go.mod
View File

@ -1,5 +1,20 @@
module github.com/bilus/gomodproxy module gitlab.connectone.pro/github/gomodproxy
go 1.16 go 1.17
require gopkg.in/src-d/go-git.v4 v4.13.1 require gopkg.in/src-d/go-git.v4 v4.13.1
require (
github.com/emirpasic/gods v1.12.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/sergi/go-diff v1.0.0 // indirect
github.com/src-d/gcfg v1.4.0 // indirect
github.com/xanzy/ssh-agent v0.2.1 // indirect
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 // indirect
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80 // indirect
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e // indirect
gopkg.in/src-d/go-billy.v4 v4.3.2 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
)

View File

@ -15,8 +15,8 @@ import (
"time" "time"
"unicode" "unicode"
"github.com/bilus/gomodproxy/pkg/store" "gitlab.connectone.pro/github/gomodproxy/pkg/store"
"github.com/bilus/gomodproxy/pkg/vcs" "gitlab.connectone.pro/github/gomodproxy/pkg/vcs"
) )
type logger = func(v ...interface{}) type logger = func(v ...interface{})

View File

@ -6,7 +6,7 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/bilus/gomodproxy/pkg/vcs" "gitlab.connectone.pro/github/gomodproxy/pkg/vcs"
) )
type disk string type disk string

View File

@ -5,7 +5,7 @@ import (
"errors" "errors"
"sync" "sync"
"github.com/bilus/gomodproxy/pkg/vcs" "gitlab.connectone.pro/github/gomodproxy/pkg/vcs"
) )
type memory struct { type memory struct {

View File

@ -4,7 +4,7 @@ import (
"context" "context"
"time" "time"
"github.com/bilus/gomodproxy/pkg/vcs" "gitlab.connectone.pro/github/gomodproxy/pkg/vcs"
) )
type logger = func(...interface{}) type logger = func(...interface{})