From 1dadfa49f3dc002513b84eb88b0ba492f99b2deb Mon Sep 17 00:00:00 2001 From: tavit ohanian Date: Sun, 20 Jun 2021 04:05:00 -0400 Subject: [PATCH] initial port --- .gitlab-ci.yml | 35 ++++++++++++++++++++++++++++ cli/cmd_suggestion.go | 2 +- cli/helptext.go | 10 ++++---- cli/helptext_test.go | 2 +- cli/parse.go | 12 +++++----- cli/parse_test.go | 4 ++-- cli/responseemitter.go | 2 +- cli/responseemitter_test.go | 2 +- cli/run.go | 2 +- cli/run_test.go | 2 +- cli/single_test.go | 2 +- command.go | 4 ++-- examples/adder/cmd.go | 4 ++-- examples/adder/local/main.go | 6 ++--- examples/adder/remote/client/main.go | 10 ++++---- examples/adder/remote/server/main.go | 4 ++-- go.mod | 8 +++---- go.sum | 10 ++++++++ http/client.go | 8 +++---- http/client_test.go | 4 ++-- http/config.go | 6 ++--- http/errors_test.go | 2 +- http/flushfwd.go | 3 ++- http/handler.go | 6 ++--- http/handler_test.go | 12 +++++----- http/http_test.go | 4 ++-- http/parse.go | 6 ++--- http/parse_test.go | 2 +- http/reforigin_test.go | 2 +- http/response.go | 2 +- http/response_test.go | 2 +- http/responseemitter.go | 4 ++-- request.go | 2 +- 33 files changed, 116 insertions(+), 70 deletions(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..dfab889 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,35 @@ +stages: + - build + - test + +variables: + BUILD_DIR: "/tmp/$CI_CONCURRENT_PROJECT_ID" + +before_script: + - mkdir -p $BUILD_DIR/src + - cd $BUILD_DIR/src + - if [ -d $CI_PROJECT_DIR ] + - then + - echo "soft link $CI_PROJECT_DIR exists" + - else + - echo "creating soft link $CI_PROJECT_DIR" + - ln -s $CI_PROJECT_DIR + - fi + - cd $CI_PROJECT_DIR + +build: + stage: build + tags: + - testing + script: + - echo $CI_JOB_STAGE + - go build + +test: + stage: test + tags: + - testing + script: + - echo $CI_JOB_STAGE + - go test -cover + coverage: '/coverage: \d+.\d+% of statements/' diff --git a/cli/cmd_suggestion.go b/cli/cmd_suggestion.go index 9b80402..096da49 100644 --- a/cli/cmd_suggestion.go +++ b/cli/cmd_suggestion.go @@ -5,8 +5,8 @@ import ( "sort" "strings" - cmds "github.com/ipfs/go-ipfs-cmds" levenshtein "github.com/texttheater/golang-levenshtein/levenshtein" + cmds "gitlab.dms3.io/dms3/public/go-dms3-cmds" ) // Make a custom slice that can be sorted by its levenshtein value diff --git a/cli/helptext.go b/cli/helptext.go index 5458bb2..8c88b33 100644 --- a/cli/helptext.go +++ b/cli/helptext.go @@ -9,7 +9,7 @@ import ( "strings" "text/template" - cmds "github.com/ipfs/go-ipfs-cmds" + cmds "gitlab.dms3.io/dms3/public/go-dms3-cmds" "golang.org/x/crypto/ssh/terminal" ) @@ -43,10 +43,10 @@ type helpFields struct { // TrimNewlines removes extra newlines from fields. This makes aligning // commands easier. Below, the leading + tralining newlines are removed: // Synopsis: ` -// ipfs config - Get value of -// ipfs config - Set value of to -// ipfs config --show - Show config file -// ipfs config --edit - Edit config file in $EDITOR +// dms3 config - Get value of +// dms3 config - Set value of to +// dms3 config --show - Show config file +// dms3 config --edit - Edit config file in $EDITOR // ` func (f *helpFields) TrimNewlines() { f.Path = strings.Trim(f.Path, "\n") diff --git a/cli/helptext_test.go b/cli/helptext_test.go index 7e13568..e59db69 100644 --- a/cli/helptext_test.go +++ b/cli/helptext_test.go @@ -4,7 +4,7 @@ import ( "strings" "testing" - cmds "github.com/ipfs/go-ipfs-cmds" + cmds "gitlab.dms3.io/dms3/public/go-dms3-cmds" ) func TestSynopsisGenerator(t *testing.T) { diff --git a/cli/parse.go b/cli/parse.go index eebd6b4..2d283fb 100644 --- a/cli/parse.go +++ b/cli/parse.go @@ -12,17 +12,17 @@ import ( "strings" osh "github.com/Kubuxu/go-os-helper" - cmds "github.com/ipfs/go-ipfs-cmds" - files "github.com/ipfs/go-ipfs-files" - logging "github.com/ipfs/go-log" + cmds "gitlab.dms3.io/dms3/public/go-dms3-cmds" + files "gitlab.dms3.io/dms3/public/go-dms3-files" + logging "gitlab.dms3.io/dms3/public/go-log" ) var log = logging.Logger("cmds/cli") -var msgStdinInfo = "ipfs: Reading from %s; send Ctrl-d to stop." +var msgStdinInfo = "dms3: Reading from %s; send Ctrl-d to stop." func init() { if osh.IsWindows() { - msgStdinInfo = "ipfs: Reading from %s; send Ctrl-z to stop." + msgStdinInfo = "dms3: Reading from %s; send Ctrl-z to stop." } } @@ -544,7 +544,7 @@ func appendFile(fpath string, argDef *cmds.Argument, recursive bool, filter *fil } } else if (stat.Mode() & os.ModeNamedPipe) != 0 { // Special case pipes that are provided directly on the command line - // We do this here instead of go-ipfs-files, as we need to differentiate between + // We do this here instead of go-dms3-files, as we need to differentiate between // recursive(unsupported) and direct(supported) mode file, err := os.Open(fpath) if err != nil { diff --git a/cli/parse_test.go b/cli/parse_test.go index 5fd5219..9ddfd1d 100644 --- a/cli/parse_test.go +++ b/cli/parse_test.go @@ -11,9 +11,9 @@ import ( "strings" "testing" - files "github.com/ipfs/go-ipfs-files" + files "gitlab.dms3.io/dms3/public/go-dms3-files" - cmds "github.com/ipfs/go-ipfs-cmds" + cmds "gitlab.dms3.io/dms3/public/go-dms3-cmds" ) type kvs map[string]interface{} diff --git a/cli/responseemitter.go b/cli/responseemitter.go index db46a90..0e69e7f 100644 --- a/cli/responseemitter.go +++ b/cli/responseemitter.go @@ -7,7 +7,7 @@ import ( "os" "sync" - "github.com/ipfs/go-ipfs-cmds" + cmds "github.com/ipfs/go-ipfs-cmds" ) var _ ResponseEmitter = &responseEmitter{} diff --git a/cli/responseemitter_test.go b/cli/responseemitter_test.go index 278c98f..4daf809 100644 --- a/cli/responseemitter_test.go +++ b/cli/responseemitter_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - cmds "github.com/ipfs/go-ipfs-cmds" + cmds "gitlab.dms3.io/dms3/public/go-dms3-cmds" ) type tcCloseWithError struct { diff --git a/cli/run.go b/cli/run.go index 46b6828..7465827 100644 --- a/cli/run.go +++ b/cli/run.go @@ -8,7 +8,7 @@ import ( "strings" "time" - "github.com/ipfs/go-ipfs-cmds" + cmds "github.com/ipfs/go-ipfs-cmds" ) // ExitError is the error used when a specific exit code needs to be returned. diff --git a/cli/run_test.go b/cli/run_test.go index a843e01..46a703d 100644 --- a/cli/run_test.go +++ b/cli/run_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/ipfs/go-ipfs-cmds" + cmds "github.com/ipfs/go-ipfs-cmds" ) var root = &cmds.Command{ diff --git a/cli/single_test.go b/cli/single_test.go index 858d374..4bf8a29 100644 --- a/cli/single_test.go +++ b/cli/single_test.go @@ -5,7 +5,7 @@ import ( "context" "testing" - cmds "github.com/ipfs/go-ipfs-cmds" + cmds "gitlab.dms3.io/dms3/public/go-dms3-cmds" ) func TestSingle(t *testing.T) { diff --git a/command.go b/command.go index f31b3de..034d3f6 100644 --- a/command.go +++ b/command.go @@ -13,9 +13,9 @@ import ( "fmt" "strings" - files "github.com/ipfs/go-ipfs-files" + files "gitlab.dms3.io/dms3/public/go-dms3-files" - logging "github.com/ipfs/go-log" + logging "gitlab.dms3.io/dms3/public/go-log" ) // DefaultOutputEncoding defines the default API output encoding. diff --git a/examples/adder/cmd.go b/examples/adder/cmd.go index 2c85921..8e79f4b 100644 --- a/examples/adder/cmd.go +++ b/examples/adder/cmd.go @@ -7,8 +7,8 @@ import ( "strings" "time" - "github.com/ipfs/go-ipfs-cmds" - "github.com/ipfs/go-ipfs-cmds/cli" + cmds "github.com/ipfs/go-ipfs-cmds" + "gitlab.dms3.io/dms3/public/go-dms3-cmds/cli" ) // AddStatus describes the progress of the add operation diff --git a/examples/adder/local/main.go b/examples/adder/local/main.go index 8e7eeaf..19a981d 100644 --- a/examples/adder/local/main.go +++ b/examples/adder/local/main.go @@ -5,10 +5,10 @@ import ( "fmt" "os" - "github.com/ipfs/go-ipfs-cmds/examples/adder" + cmds "github.com/ipfs/go-ipfs-cmds" + "gitlab.dms3.io/dms3/public/go-dms3-cmds/examples/adder" - "github.com/ipfs/go-ipfs-cmds" - "github.com/ipfs/go-ipfs-cmds/cli" + "gitlab.dms3.io/dms3/public/go-dms3-cmds/cli" ) func main() { diff --git a/examples/adder/remote/client/main.go b/examples/adder/remote/client/main.go index 373f196..2c9179e 100644 --- a/examples/adder/remote/client/main.go +++ b/examples/adder/remote/client/main.go @@ -4,12 +4,12 @@ import ( "context" "os" - "github.com/ipfs/go-ipfs-cmds/examples/adder" + "gitlab.dms3.io/dms3/public/go-dms3-cmds/examples/adder" - //cmds "github.com/ipfs/go-ipfs-cmds" - cmds "github.com/ipfs/go-ipfs-cmds" - cli "github.com/ipfs/go-ipfs-cmds/cli" - http "github.com/ipfs/go-ipfs-cmds/http" + //cmds "gitlab.dms3.io/dms3/public/go-dms3-cmds" + cmds "gitlab.dms3.io/dms3/public/go-dms3-cmds" + cli "gitlab.dms3.io/dms3/public/go-dms3-cmds/cli" + http "gitlab.dms3.io/dms3/public/go-dms3-cmds/http" ) func main() { diff --git a/examples/adder/remote/server/main.go b/examples/adder/remote/server/main.go index 75c2ca9..793bca1 100644 --- a/examples/adder/remote/server/main.go +++ b/examples/adder/remote/server/main.go @@ -3,9 +3,9 @@ package main import ( nethttp "net/http" - "github.com/ipfs/go-ipfs-cmds/examples/adder" + "gitlab.dms3.io/dms3/public/go-dms3-cmds/examples/adder" - http "github.com/ipfs/go-ipfs-cmds/http" + http "gitlab.dms3.io/dms3/public/go-dms3-cmds/http" ) type env struct{} diff --git a/go.mod b/go.mod index 484d0e4..b3a47de 100644 --- a/go.mod +++ b/go.mod @@ -1,11 +1,11 @@ -module github.com/ipfs/go-ipfs-cmds +module gitlab.dms3.io/dms3/public/go-dms3-cmds -go 1.14 +go 1.15 require ( github.com/Kubuxu/go-os-helper v0.0.1 - github.com/ipfs/go-ipfs-files v0.0.8 - github.com/ipfs/go-log v1.0.4 + gitlab.dms3.io/dms3/public/go-dms3-files v0.0.1 + gitlab.dms3.io/dms3/public/go-log v0.0.1 github.com/rs/cors v1.7.0 github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d diff --git a/go.sum b/go.sum index 7da8d5a..25991c0 100644 --- a/go.sum +++ b/go.sum @@ -39,14 +39,24 @@ github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJy github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e h1:T5PdfK/M1xyrHwynxMIVMWLS7f/qHwfslZphxtGnw7s= github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e/go.mod h1:XDKHRm5ThF8YJjx001LtgelzsoaEcvnA7lVWz9EeX3g= +gitlab.dms3.io/dms3/public/go-dms3-files v0.0.1 h1:q/ygphIIE5jY55tEWRi4jFFYnQqncEPHA/0yDMfxNGg= +gitlab.dms3.io/dms3/public/go-dms3-files v0.0.1/go.mod h1:6HW2p8o4qGXvZ/TX4A/HzabOPfw3PsxiJbhFxQpqZBM= +gitlab.dms3.io/dms3/public/go-log v0.0.1 h1:jqz2g8pVdPW+Sy8CCo4rYfGEjktGhCBfgIb3oeY6yx8= +gitlab.dms3.io/dms3/public/go-log v0.0.1/go.mod h1:OsyF7lVYe47r03v1ZCbrmz0byeGUWB0Y219jN1DJx3s= go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.14.1 h1:nYDKopTbvAPq/NrUVZwT15y2lpROBiLLyoRTbXOYWOo= go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= +go.uber.org/zap v1.16.0 h1:uFRZXykJGK9lLY4HtgSw44DnIcAM+kRBP7x5m+NpAOM= +go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d h1:2+ZP7EfsZV7Vvmx3TIqSlSzATMkTAKqM14YGFPoSKjI= diff --git a/http/client.go b/http/client.go index d19c9fb..4994914 100644 --- a/http/client.go +++ b/http/client.go @@ -9,9 +9,9 @@ import ( "net/url" "strings" - "github.com/ipfs/go-ipfs-cmds" - - "github.com/ipfs/go-ipfs-files" + cmds "github.com/ipfs/go-ipfs-cmds" + files "github.com/ipfs/go-ipfs-files" + "gitlab.dms3.io/dms3/public/go-dms3-cmds" ) const ( @@ -73,7 +73,7 @@ func NewClient(address string, opts ...ClientOpt) cmds.Executor { c := &client{ serverAddress: address, httpClient: http.DefaultClient, - ua: "go-ipfs-cmds/http", + ua: "go-dms3-cmds/http", } for _, opt := range opts { diff --git a/http/client_test.go b/http/client_test.go index ef714d0..86f07a6 100644 --- a/http/client_test.go +++ b/http/client_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - cmds "github.com/ipfs/go-ipfs-cmds" + cmds "gitlab.dms3.io/dms3/public/go-dms3-cmds" ) func TestClientUserAgent(t *testing.T) { @@ -17,7 +17,7 @@ func TestClientUserAgent(t *testing.T) { } tcs := []testcase{ - {ua: "/go-ipfs/0.4", path: []string{"version"}}, + {ua: "/go-dms3/0.4", path: []string{"version"}}, } for _, tc := range tcs { diff --git a/http/config.go b/http/config.go index 69a0263..644a33b 100644 --- a/http/config.go +++ b/http/config.go @@ -90,7 +90,7 @@ func (cfg *ServerConfig) SetAllowCredentials(flag bool) { func allowOrigin(r *http.Request, cfg *ServerConfig) bool { origin := r.Header.Get("Origin") - // curl, or ipfs shell, typing it in manually, or clicking link + // curl, or dms3 shell, typing it in manually, or clicking link // NOT in a browser. this opens up a hole. we should close it, // but right now it would break things. TODO if origin == "" { @@ -114,11 +114,11 @@ func allowOrigin(r *http.Request, cfg *ServerConfig) bool { // the API would be vulnerable to. We check that the Referer // is allowed by CORS Origin (origins and referrers here will // work similarly in the normal uses of the API). -// See discussion at https://github.com/ipfs/go-ipfs/issues/1532 +// See discussion at https://gitlab.dms3.io/dms3/public/go-dms3/issues/1532 func allowReferer(r *http.Request, cfg *ServerConfig) bool { referer := r.Referer() - // curl, or ipfs shell, typing it in manually, or clicking link + // curl, or dms3 shell, typing it in manually, or clicking link // NOT in a browser. this opens up a hole. we should close it, // but right now it would break things. TODO if referer == "" { diff --git a/http/errors_test.go b/http/errors_test.go index 2cef1b0..1f0e735 100644 --- a/http/errors_test.go +++ b/http/errors_test.go @@ -9,7 +9,7 @@ import ( "strings" "testing" - cmds "github.com/ipfs/go-ipfs-cmds" + cmds "gitlab.dms3.io/dms3/public/go-dms3-cmds" ) func TestErrors(t *testing.T) { diff --git a/http/flushfwd.go b/http/flushfwd.go index 4f67c54..6f99849 100644 --- a/http/flushfwd.go +++ b/http/flushfwd.go @@ -1,8 +1,9 @@ package http import ( - "github.com/ipfs/go-ipfs-cmds" "net/http" + + cmds "gitlab.dms3.io/dms3/public/go-dms3-cmds" ) type flushfwder struct { diff --git a/http/handler.go b/http/handler.go index 9afd4a4..5a32017 100644 --- a/http/handler.go +++ b/http/handler.go @@ -9,9 +9,9 @@ import ( "sync" "time" - cmds "github.com/ipfs/go-ipfs-cmds" - logging "github.com/ipfs/go-log" cors "github.com/rs/cors" + cmds "gitlab.dms3.io/dms3/public/go-dms3-cmds" + logging "gitlab.dms3.io/dms3/public/go-log" ) var log = logging.Logger("cmds/http") @@ -132,7 +132,7 @@ func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { // If we have a request body, make sure the preamble // knows that it should close the body if it wants to // write before completing reading. - // FIXME: https://github.com/ipfs/go-ipfs/issues/5168 + // FIXME: https://gitlab.dms3.io/dms3/public/go-dms3/issues/5168 // FIXME: https://github.com/golang/go/issues/15527 var bodyEOFChan chan struct{} if r.Body != http.NoBody { diff --git a/http/handler_test.go b/http/handler_test.go index ba8dd14..c2ab3a7 100644 --- a/http/handler_test.go +++ b/http/handler_test.go @@ -11,8 +11,8 @@ import ( "testing" - cmds "github.com/ipfs/go-ipfs-cmds" - files "github.com/ipfs/go-ipfs-files" + cmds "gitlab.dms3.io/dms3/public/go-dms3-cmds" + files "gitlab.dms3.io/dms3/public/go-dms3-files" ) type VersionOutput struct { @@ -222,8 +222,8 @@ var ( "version": &cmds.Command{ Helptext: cmds.HelpText{ - Tagline: "Show ipfs version information.", - ShortDescription: "Returns the current version of ipfs and exits.", + Tagline: "Show dms3 version information.", + ShortDescription: "Returns the current version of dms3 and exits.", }, Type: VersionOutput{}, Options: []cmds.Option{ @@ -276,14 +276,14 @@ var ( } if all, ok := req.Options["all"].(bool); ok && all { - _, err := fmt.Fprintf(w, "go-ipfs version: %s-%s\n"+ + _, err := fmt.Fprintf(w, "go-dms3 version: %s-%s\n"+ "Repo version: %s\nSystem version: %s\nGolang version: %s\n", v.Version, v.Commit, v.Repo, v.System, v.Golang) return err } - _, err := fmt.Fprintf(w, "ipfs version %s%s\n", v.Version, commitTxt) + _, err := fmt.Fprintf(w, "dms3 version %s%s\n", v.Version, commitTxt) return err }), }, diff --git a/http/http_test.go b/http/http_test.go index 66aa85f..d10f7e8 100644 --- a/http/http_test.go +++ b/http/http_test.go @@ -12,9 +12,9 @@ import ( "strings" "testing" - cmds "github.com/ipfs/go-ipfs-cmds" + cmds "gitlab.dms3.io/dms3/public/go-dms3-cmds" - files "github.com/ipfs/go-ipfs-files" + files "gitlab.dms3.io/dms3/public/go-dms3-files" ) func newReaderPathFile(t *testing.T, path string, reader io.ReadCloser, stat os.FileInfo) files.File { diff --git a/http/parse.go b/http/parse.go index 2bd3ac2..c0f2617 100644 --- a/http/parse.go +++ b/http/parse.go @@ -10,10 +10,10 @@ import ( "strconv" "strings" - cmds "github.com/ipfs/go-ipfs-cmds" + cmds "gitlab.dms3.io/dms3/public/go-dms3-cmds" - files "github.com/ipfs/go-ipfs-files" - logging "github.com/ipfs/go-log" + files "gitlab.dms3.io/dms3/public/go-dms3-files" + logging "gitlab.dms3.io/dms3/public/go-log" ) // parseRequest parses the data in a http.Request and returns a command Request object diff --git a/http/parse_test.go b/http/parse_test.go index 1d903c3..27e9eee 100644 --- a/http/parse_test.go +++ b/http/parse_test.go @@ -9,7 +9,7 @@ import ( "reflect" "testing" - cmds "github.com/ipfs/go-ipfs-cmds" + cmds "gitlab.dms3.io/dms3/public/go-dms3-cmds" ) func TestParse(t *testing.T) { diff --git a/http/reforigin_test.go b/http/reforigin_test.go index 915673c..3147694 100644 --- a/http/reforigin_test.go +++ b/http/reforigin_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - cmds "github.com/ipfs/go-ipfs-cmds" + cmds "gitlab.dms3.io/dms3/public/go-dms3-cmds" ) func assertHeaders(t *testing.T, resHeaders http.Header, reqHeaders map[string]string) { diff --git a/http/response.go b/http/response.go index 3ba2d93..1964dfc 100644 --- a/http/response.go +++ b/http/response.go @@ -7,7 +7,7 @@ import ( "reflect" "strings" - "github.com/ipfs/go-ipfs-cmds" + cmds "github.com/ipfs/go-ipfs-cmds" ) var ( diff --git a/http/response_test.go b/http/response_test.go index 263ea5b..15781a2 100644 --- a/http/response_test.go +++ b/http/response_test.go @@ -3,7 +3,7 @@ package http import ( "testing" - "github.com/ipfs/go-ipfs-cmds" + cmds "github.com/ipfs/go-ipfs-cmds" ) type testResponseType struct { diff --git a/http/responseemitter.go b/http/responseemitter.go index e5d424e..d45c70f 100644 --- a/http/responseemitter.go +++ b/http/responseemitter.go @@ -8,7 +8,7 @@ import ( "strings" "sync" - cmds "github.com/ipfs/go-ipfs-cmds" + cmds "gitlab.dms3.io/dms3/public/go-dms3-cmds" ) var ( @@ -269,7 +269,7 @@ func (re *responseEmitter) doPreamble(value interface{}) { // If we have a request body, make sure we close the body // if we want to write before completing reading. - // FIXME: https://github.com/ipfs/go-ipfs/issues/5168 + // FIXME: https://gitlab.dms3.io/dms3/public/go-dms3/issues/5168 // FIXME: https://github.com/golang/go/issues/15527 if re.bodyEOFChan != nil { select { diff --git a/request.go b/request.go index 5443b66..01bd954 100644 --- a/request.go +++ b/request.go @@ -5,7 +5,7 @@ import ( "fmt" "reflect" - files "github.com/ipfs/go-ipfs-files" + files "gitlab.dms3.io/dms3/public/go-dms3-files" ) // Request represents a call to a command from a consumer -- GitLab