Migrate to GitLab

This commit is contained in:
Trevor Slocum 2020-01-22 17:37:11 -08:00
parent 09386ae12d
commit bcf8c794d7
17 changed files with 60 additions and 107 deletions

View File

@ -1,27 +0,0 @@
arch: amd64
environment:
PROJECT_DIR: '~/go/src/git.sr.ht/~tslocum'
PROJECT_NAME: 'gophast'
CGO_ENABLED: '0'
GO111MODULE: 'on'
image: freebsd/latest
packages:
- go
sources:
- https://git.sr.ht/~tslocum/gophast
tasks:
- setup: |
mkdir -p $PROJECT_DIR
mv $PROJECT_NAME $PROJECT_DIR/$PROJECT_NAME
- deps: |
cd $PROJECT_DIR/$PROJECT_NAME
go mod download
- test: |
cd $PROJECT_DIR/$PROJECT_NAME
go test -v -cover ./...
- build: |
cd $PROJECT_DIR/$PROJECT_NAME/cmd/$PROJECT_NAME
go build
- run: |
cd $PROJECT_DIR/$PROJECT_NAME/cmd/$PROJECT_NAME
./$PROJECT_NAME --help

View File

@ -1,27 +0,0 @@
arch: x86_64
environment:
PROJECT_DIR: '~/go/src/git.sr.ht/~tslocum'
PROJECT_NAME: 'gophast'
CGO_ENABLED: '0'
GO111MODULE: 'on'
image: alpine/edge
packages:
- go
sources:
- https://git.sr.ht/~tslocum/gophast
tasks:
- setup: |
mkdir -p $PROJECT_DIR
mv $PROJECT_NAME $PROJECT_DIR/$PROJECT_NAME
- deps: |
cd $PROJECT_DIR/$PROJECT_NAME
go mod download
- test: |
cd $PROJECT_DIR/$PROJECT_NAME
go test -v -cover ./...
- build: |
cd $PROJECT_DIR/$PROJECT_NAME/cmd/$PROJECT_NAME
go build
- run: |
cd $PROJECT_DIR/$PROJECT_NAME/cmd/$PROJECT_NAME
./$PROJECT_NAME --help

8
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,8 @@
stages:
- test
test:
image: golang:latest
stage: test
script:
- go test -v ./...

View File

@ -1,6 +1,6 @@
# gophast
[![GoDoc](https://godoc.org/git.sr.ht/~tslocum/gophast?status.svg)](https://godoc.org/git.sr.ht/~tslocum/gophast)
[![builds.sr.ht status](https://builds.sr.ht/~tslocum/gophast.svg)](https://builds.sr.ht/~tslocum/gophast)
[![GoDoc](https://godoc.org/gitlab.com/tslocum/gophast?status.svg)](https://godoc.org/gitlab.com/tslocum/gophast)
[![CI status](https://gitlab.com/tslocum/gophast/badges/master/pipeline.svg)](https://gitlab.com/tslocum/gophast/commits/master)
[![Donate](https://img.shields.io/liberapay/receives/rocketnine.space.svg?logo=liberapay)](https://liberapay.com/rocketnine.space)
Download manager and accelerator
@ -15,9 +15,9 @@ Download manager and accelerator
## Installation
- [Download prebuilt binaries for Windows and Linux](https://gophast.rocketnine.space/download/)
- [**Download gophast**](https://gophast.rocketnine.space/download/?sort=name&order=desc)
- Or use ```go get```:
- ```GO111MODULE=on go get -u git.sr.ht/~tslocum/gophast/cmd/gophast```
- ```go get gitlab.com/tslocum/gophast/cmd/gophast```
## Usage

View File

@ -13,15 +13,15 @@ import (
"syscall"
"time"
"git.sr.ht/~tslocum/gophast/pkg/config"
"git.sr.ht/~tslocum/gophast/pkg/download"
"git.sr.ht/~tslocum/gophast/pkg/log"
"git.sr.ht/~tslocum/gophast/pkg/manager"
. "git.sr.ht/~tslocum/gophast/pkg/utils"
"github.com/dustin/go-humanize"
"github.com/mattn/go-isatty"
"github.com/pkg/errors"
"github.com/urfave/cli"
"gitlab.com/tslocum/gophast/pkg/config"
"gitlab.com/tslocum/gophast/pkg/download"
"gitlab.com/tslocum/gophast/pkg/log"
"gitlab.com/tslocum/gophast/pkg/manager"
. "gitlab.com/tslocum/gophast/pkg/utils"
"golang.org/x/crypto/ssh/terminal"
)
@ -33,7 +33,7 @@ const (
)
const VersionInfo = `gophast - Download manager and accelerator - v%s
https://git.sr.ht/~tslocum/gophast
https://gitlab.com/tslocum/gophast
The MIT License (MIT)
Copyright (c) 2019 Trevor Slocum <trevor@rocketnine.space>
`

15
go.mod
View File

@ -1,17 +1,16 @@
module git.sr.ht/~tslocum/gophast
module gitlab.com/tslocum/gophast
go 1.12
require (
git.sr.ht/~tslocum/preallocate v0.1.2
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dustin/go-humanize v1.0.0
github.com/mattn/go-isatty v0.0.10
github.com/pkg/errors v0.8.1
github.com/mattn/go-isatty v0.0.12
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.3.0
github.com/urfave/cli v1.22.1
github.com/vbauerster/mpb/v4 v4.11.1
golang.org/x/crypto v0.0.0-20191112222119-e1110fd1c708
golang.org/x/sys v0.0.0-20191115151921-52ab43148777 // indirect
github.com/urfave/cli v1.22.2
github.com/vbauerster/mpb/v4 v4.11.2
gitlab.com/tslocum/preallocate v0.1.3-0.20200123004449-30cf2261fd8e
golang.org/x/crypto v0.0.0-20200117160349-530e935923ad
)

34
go.sum
View File

@ -1,9 +1,8 @@
git.sr.ht/~tslocum/preallocate v0.1.2 h1:v17Ctvip7VaqMk63RCjtDb6gq9YdNfWfIBbvcDoziwc=
git.sr.ht/~tslocum/preallocate v0.1.2/go.mod h1:9yyz7jeM3zMwFJ0o6Njpu3K9KeXnWeyzCTbxW6UeXzQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/VividCortex/ewma v1.1.1 h1:MnEK4VOv6n0RSY4vtRe3h11qjxL3+t0B8yOL8iMXdcM=
github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpHMqeKTCYkitsPqHNxTmd4SNR5r94FGM8=
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM=
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
@ -12,10 +11,10 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/mattn/go-isatty v0.0.10 h1:qxFzApOv4WsAL965uUPIsXzAKCZxN2p9UqdhFS4ZW10=
github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
@ -25,22 +24,23 @@ github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeV
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY=
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/vbauerster/mpb/v4 v4.11.1 h1:ZOYQSVHgmeanXsbyC44aDg76tBGCS/54Rk8VkL8dJGA=
github.com/vbauerster/mpb/v4 v4.11.1/go.mod h1:vMLa1J/ZKC83G2lB/52XpqT+ZZtFG4aZOdKhmpRL1uM=
github.com/urfave/cli v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo=
github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/vbauerster/mpb/v4 v4.11.2 h1:ynkUoKzi65DZ1UsQPx7sgi/KN6G9f7br+Us2nKm35AM=
github.com/vbauerster/mpb/v4 v4.11.2/go.mod h1:jIuIRCltGJUnm6DCyPVkwjlLUk4nHTH+m4eD14CdFF0=
gitlab.com/tslocum/preallocate v0.1.3-0.20200123004449-30cf2261fd8e h1:Xo+MvG7xm8OqksHbmkdK2A8g2AnkEj64bHArGkwPhsY=
gitlab.com/tslocum/preallocate v0.1.3-0.20200123004449-30cf2261fd8e/go.mod h1:/eDdu4oKrceQXn+mCA38vam9SxqWEBKDx2+mQz1ETq0=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191112222119-e1110fd1c708 h1:pXVtWnwHkrWD9ru3sDxY/qFK/bfc0egRovX91EjWjf4=
golang.org/x/crypto v0.0.0-20191112222119-e1110fd1c708/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200117160349-530e935923ad h1:Jh8cai0fqIK+f6nG0UgPW5wFk8wmiMhM3AyciDBdtQg=
golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
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-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190610200419-93c9922d18ae h1:xiXzMMEQdQcric9hXtr1QU98MHunKK7OTtsoU6bYWs4=
golang.org/x/sys v0.0.0-20190610200419-93c9922d18ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191113165036-4c7a9d0fe056/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191115151921-52ab43148777 h1:wejkGHRTr38uaKRqECZlsCsJ1/TGxIyFbH32x5zUdu4=
golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82 h1:ywK/j/KkyTHcdyYSZNXGjMwgmDSfjglYZ3vStQ/gSCU=
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
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=

View File

@ -5,7 +5,7 @@ builds:
env:
- CGO_ENABLED=0
ldflags:
- -s -w -X git.sr.ht/~tslocum/gophast/pkg/config.Version={{.Version}}
- -s -w -X gitlab.com/tslocum/gophast/pkg/config.Version={{.Version}}
goos:
# - darwin
# - freebsd

View File

@ -71,7 +71,7 @@ func (c *Config) SetUserAgent() {
if Version != "" {
ua += "/" + Version
}
ua += " (https://git.sr.ht/~tslocum/gophast)"
ua += " (https://gitlab.com/tslocum/gophast)"
c.UserAgent = ua
}

View File

@ -8,9 +8,9 @@ import (
"regexp"
"strconv"
"git.sr.ht/~tslocum/gophast/pkg/log"
"git.sr.ht/~tslocum/gophast/pkg/utils"
"github.com/pkg/errors"
"gitlab.com/tslocum/gophast/pkg/log"
"gitlab.com/tslocum/gophast/pkg/utils"
)
type ControlFile struct {

View File

@ -14,12 +14,12 @@ import (
"sync"
"time"
"git.sr.ht/~tslocum/gophast/pkg/config"
"git.sr.ht/~tslocum/gophast/pkg/log"
. "git.sr.ht/~tslocum/gophast/pkg/utils"
"git.sr.ht/~tslocum/preallocate"
"github.com/dustin/go-humanize"
"github.com/pkg/errors"
"gitlab.com/tslocum/gophast/pkg/config"
"gitlab.com/tslocum/gophast/pkg/log"
. "gitlab.com/tslocum/gophast/pkg/utils"
"gitlab.com/tslocum/preallocate"
)
const (

View File

@ -8,16 +8,16 @@ import (
"strconv"
"time"
"git.sr.ht/~tslocum/gophast/pkg/config"
. "git.sr.ht/~tslocum/gophast/pkg/utils"
"github.com/vbauerster/mpb/v4"
"github.com/vbauerster/mpb/v4/decor"
"gitlab.com/tslocum/gophast/pkg/config"
. "gitlab.com/tslocum/gophast/pkg/utils"
)
const (
RefreshRate = 120 * time.Millisecond
SpeedAverageWindow = 45.0 // 45 seconds
BarStyle = "|-> |"
BarStyle = "|-> |"
)
var (

View File

@ -5,7 +5,7 @@ import (
"log"
"os"
"git.sr.ht/~tslocum/gophast/pkg/config"
"gitlab.com/tslocum/gophast/pkg/config"
)
func init() {

View File

@ -3,7 +3,7 @@ package manager
import (
"time"
"git.sr.ht/~tslocum/gophast/pkg/config"
"gitlab.com/tslocum/gophast/pkg/config"
)
func GetGoPhastVersion() string {

View File

@ -5,9 +5,9 @@ import (
"strings"
"sync"
"git.sr.ht/~tslocum/gophast/pkg/config"
"git.sr.ht/~tslocum/gophast/pkg/download"
"git.sr.ht/~tslocum/gophast/pkg/log"
"gitlab.com/tslocum/gophast/pkg/config"
"gitlab.com/tslocum/gophast/pkg/download"
"gitlab.com/tslocum/gophast/pkg/log"
)
type Metadata struct {

View File

@ -1,7 +1,7 @@
package manager
import (
"git.sr.ht/~tslocum/gophast/pkg/config"
"gitlab.com/tslocum/gophast/pkg/config"
)
var (

View File

@ -1,7 +1,7 @@
package manager
import (
"git.sr.ht/~tslocum/gophast/pkg/config"
"gitlab.com/tslocum/gophast/pkg/config"
)
func init() {