mirror of
https://github.com/nabbar/golib.git
synced 2025-10-06 00:06:50 +08:00
Rework ioutils/gzipreader/fileprogress
Package ioutils: - remove file progress from ioutils and rework it to package file/progress Package file/progress: - simplify call / use of file progress - optimize code - use atomic to function progress - isolation part of code - make interface more compatible with *os/File / io interface Package archive/gzipreader - create package to expose a io.reader interface from a no gzipped io.reader - add interface GZipReader to expose metrics like rate of compression Package archive: - apply following change - add minor internal change into errors files Package artifact: - apply following change - add minor internal change into errors files Package aws: - apply following change - removing minio server from repo Package mail: - apply following change - add minor internal change into errors files Package nutsdb: - apply following change - add minor internal change into errors files Package static: - apply following change Other: - bump dependencies - ci/cd : add a wget command to dl minio server for testing - add aws/minio to gitignore
This commit is contained in:
@@ -30,10 +30,10 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/google/go-github/v33/github"
|
||||
"github.com/nabbar/golib/artifact"
|
||||
"github.com/nabbar/golib/artifact/client"
|
||||
"github.com/nabbar/golib/errors"
|
||||
github "github.com/google/go-github/v33/github"
|
||||
libart "github.com/nabbar/golib/artifact"
|
||||
artcli "github.com/nabbar/golib/artifact/client"
|
||||
liberr "github.com/nabbar/golib/errors"
|
||||
)
|
||||
|
||||
func getOrgProjectFromRepos(repos string) (owner string, project string) {
|
||||
@@ -45,11 +45,11 @@ func getOrgProjectFromRepos(repos string) (owner string, project string) {
|
||||
return lst[0], lst[1]
|
||||
}
|
||||
|
||||
func NewGithub(ctx context.Context, httpcli *http.Client, repos string) (cli artifact.Client, err errors.Error) {
|
||||
func NewGithub(ctx context.Context, httpcli *http.Client, repos string) (cli libart.Client, err liberr.Error) {
|
||||
o, p := getOrgProjectFromRepos(repos)
|
||||
|
||||
a := &githubModel{
|
||||
ClientHelper: client.ClientHelper{},
|
||||
ClientHelper: artcli.ClientHelper{},
|
||||
c: github.NewClient(httpcli),
|
||||
x: ctx,
|
||||
o: o,
|
||||
@@ -61,11 +61,11 @@ func NewGithub(ctx context.Context, httpcli *http.Client, repos string) (cli art
|
||||
return a, err
|
||||
}
|
||||
|
||||
func NewGithubWithTokenOAuth(ctx context.Context, repos string, oauth2client *http.Client) (cli artifact.Client, err errors.Error) {
|
||||
func NewGithubWithTokenOAuth(ctx context.Context, repos string, oauth2client *http.Client) (cli libart.Client, err liberr.Error) {
|
||||
o, p := getOrgProjectFromRepos(repos)
|
||||
|
||||
a := &githubModel{
|
||||
ClientHelper: client.ClientHelper{},
|
||||
ClientHelper: artcli.ClientHelper{},
|
||||
c: github.NewClient(oauth2client),
|
||||
x: ctx,
|
||||
o: o,
|
||||
|
Reference in New Issue
Block a user