diff --git a/Makefile b/Makefile index cef027c7..aeee7f1d 100644 --- a/Makefile +++ b/Makefile @@ -19,31 +19,31 @@ verifiers: vet fmt lint cyclo deadcode spelling vet: @echo "Running $@:" @GO15VENDOREXPERIMENT=1 go tool vet -all *.go - @GO15VENDOREXPERIMENT=1 go tool vet -all ./command + @GO15VENDOREXPERIMENT=1 go tool vet -all ./mc @GO15VENDOREXPERIMENT=1 go tool vet -all ./pkg @GO15VENDOREXPERIMENT=1 go tool vet -shadow=true *.go - @GO15VENDOREXPERIMENT=1 go tool vet -shadow=true ./command + @GO15VENDOREXPERIMENT=1 go tool vet -shadow=true ./mc @GO15VENDOREXPERIMENT=1 go tool vet -shadow=true ./pkg spelling: @GO15VENDOREXPERIMENT=1 ${GOPATH}/bin/misspell * - @GO15VENDOREXPERIMENT=1 ${GOPATH}/bin/misspell command/* + @GO15VENDOREXPERIMENT=1 ${GOPATH}/bin/misspell mc/* @GO15VENDOREXPERIMENT=1 ${GOPATH}/bin/misspell pkg/**/* fmt: @echo "Running $@:" @GO15VENDOREXPERIMENT=1 gofmt -s -l *.go - @GO15VENDOREXPERIMENT=1 gofmt -s -l command + @GO15VENDOREXPERIMENT=1 gofmt -s -l mc @GO15VENDOREXPERIMENT=1 gofmt -s -l pkg lint: @echo "Running $@:" @GO15VENDOREXPERIMENT=1 $(GOPATH)/bin/golint . - @GO15VENDOREXPERIMENT=1 $(GOPATH)/bin/golint github.com/minio/mc/command... + @GO15VENDOREXPERIMENT=1 $(GOPATH)/bin/golint github.com/minio/mc/mc... @GO15VENDOREXPERIMENT=1 $(GOPATH)/bin/golint github.com/minio/mc/pkg... cyclo: @echo "Running $@:" - @GO15VENDOREXPERIMENT=1 $(GOPATH)/bin/gocyclo -over 40 command + @GO15VENDOREXPERIMENT=1 $(GOPATH)/bin/gocyclo -over 40 mc @GO15VENDOREXPERIMENT=1 $(GOPATH)/bin/gocyclo -over 40 pkg deadcode: @@ -54,7 +54,7 @@ build: getdeps verifiers test: getdeps verifiers @echo "Running all testing:" - @GO15VENDOREXPERIMENT=1 go test $(GOFLAGS) github.com/minio/mc/command... + @GO15VENDOREXPERIMENT=1 go test $(GOFLAGS) github.com/minio/mc/mc... @GO15VENDOREXPERIMENT=1 go test $(GOFLAGS) github.com/minio/mc/pkg... gomake-all: build diff --git a/appveyor.yml b/appveyor.yml index 570b7239..79c48f53 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -19,7 +19,7 @@ install: # to run your custom scripts instead of automatic MSBuild build_script: - - go test -race github.com/minio/mc/command... + - go test -race github.com/minio/mc/mc... - go test -race github.com/minio/mc/pkg... - go test -coverprofile=coverage.txt -covermode=atomic - go run buildscripts/gen-ldflags.go > temp.txt diff --git a/buildscripts/gen-ldflags.go b/buildscripts/gen-ldflags.go index be553661..7bc33b4f 100644 --- a/buildscripts/gen-ldflags.go +++ b/buildscripts/gen-ldflags.go @@ -28,10 +28,10 @@ import ( func genLDFlags(version string) string { var ldflagsStr string - ldflagsStr = "-X github.com/minio/mc/command.MCVersion=" + version + " " - ldflagsStr = ldflagsStr + "-X github.com/minio/mc/command.MCReleaseTag=" + releaseTag(version) + " " - ldflagsStr = ldflagsStr + "-X github.com/minio/mc/command.MCCommitID=" + commitID() + " " - ldflagsStr = ldflagsStr + "-X github.com/minio/mc/command.MCShortCommitID=" + commitID()[:12] + ldflagsStr = "-X github.com/minio/mc/mc.MCVersion=" + version + " " + ldflagsStr = ldflagsStr + "-X github.com/minio/mc/mc.MCReleaseTag=" + releaseTag(version) + " " + ldflagsStr = ldflagsStr + "-X github.com/minio/mc/mc.MCCommitID=" + commitID() + " " + ldflagsStr = ldflagsStr + "-X github.com/minio/mc/mc.MCShortCommitID=" + commitID()[:12] return ldflagsStr } diff --git a/main.go b/main.go index 461bc65f..ba1f21dc 100644 --- a/main.go +++ b/main.go @@ -16,8 +16,8 @@ package main -import command "github.com/minio/mc/command" +import mc "github.com/minio/mc/mc" func main() { - command.Main() + mc.Main() } diff --git a/command/access-perms.go b/mc/access-perms.go similarity index 98% rename from command/access-perms.go rename to mc/access-perms.go index 4f9850f0..4c9702d9 100644 --- a/command/access-perms.go +++ b/mc/access-perms.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc // isValidAccessPERM - is provided access perm string supported. func (b accessPerms) isValidAccessPERM() bool { diff --git a/command/accounting-reader.go b/mc/accounting-reader.go similarity index 99% rename from command/accounting-reader.go rename to mc/accounting-reader.go index 277cb094..33b3fb2f 100644 --- a/command/accounting-reader.go +++ b/mc/accounting-reader.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "sync" diff --git a/command/api_handlers_test.go b/mc/api_handlers_test.go similarity index 99% rename from command/api_handlers_test.go rename to mc/api_handlers_test.go index cf5e4623..00a815ca 100644 --- a/command/api_handlers_test.go +++ b/mc/api_handlers_test.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "bytes" diff --git a/command/build-constants.go b/mc/build-constants.go similarity index 98% rename from command/build-constants.go rename to mc/build-constants.go index 022c5c9d..415c9d36 100644 --- a/command/build-constants.go +++ b/mc/build-constants.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc var ( // MCVersion - version time.RFC3339. diff --git a/command/cat-main.go b/mc/cat-main.go similarity index 99% rename from command/cat-main.go rename to mc/cat-main.go index 5999a5d6..a78b02b9 100644 --- a/command/cat-main.go +++ b/mc/cat-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "errors" diff --git a/command/client-errors.go b/mc/client-errors.go similarity index 99% rename from command/client-errors.go rename to mc/client-errors.go index 8a40bf3b..6747c727 100644 --- a/command/client-errors.go +++ b/mc/client-errors.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import "fmt" diff --git a/command/client-fs.go b/mc/client-fs.go similarity index 99% rename from command/client-fs.go rename to mc/client-fs.go index 0283145e..49cb6519 100644 --- a/command/client-fs.go +++ b/mc/client-fs.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "io" diff --git a/command/client-fs_test.go b/mc/client-fs_test.go similarity index 99% rename from command/client-fs_test.go rename to mc/client-fs_test.go index c076c70f..3c1b98be 100644 --- a/command/client-fs_test.go +++ b/mc/client-fs_test.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "bytes" diff --git a/command/client-s3-trace_v2.go b/mc/client-s3-trace_v2.go similarity index 99% rename from command/client-s3-trace_v2.go rename to mc/client-s3-trace_v2.go index 1b08cdbc..fdbe03f6 100644 --- a/command/client-s3-trace_v2.go +++ b/mc/client-s3-trace_v2.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "bytes" diff --git a/command/client-s3-trace_v4.go b/mc/client-s3-trace_v4.go similarity index 99% rename from command/client-s3-trace_v4.go rename to mc/client-s3-trace_v4.go index b2a15127..d516b105 100644 --- a/command/client-s3-trace_v4.go +++ b/mc/client-s3-trace_v4.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "bytes" diff --git a/command/client-s3.go b/mc/client-s3.go similarity index 99% rename from command/client-s3.go rename to mc/client-s3.go index 9eb583f2..22466453 100644 --- a/command/client-s3.go +++ b/mc/client-s3.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "errors" diff --git a/command/client-s3_test.go b/mc/client-s3_test.go similarity index 99% rename from command/client-s3_test.go rename to mc/client-s3_test.go index 8cc09497..ee00db53 100644 --- a/command/client-s3_test.go +++ b/mc/client-s3_test.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc // bucketHandler is an http.Handler that verifies bucket responses and validates incoming requests import ( diff --git a/command/client-url.go b/mc/client-url.go similarity index 99% rename from command/client-url.go rename to mc/client-url.go index f8d19dd4..93f2115c 100644 --- a/command/client-url.go +++ b/mc/client-url.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "bytes" diff --git a/command/client-url_test.go b/mc/client-url_test.go similarity index 99% rename from command/client-url_test.go rename to mc/client-url_test.go index 8c670a57..d39980b2 100644 --- a/command/client-url_test.go +++ b/mc/client-url_test.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import . "gopkg.in/check.v1" diff --git a/command/client.go b/mc/client.go similarity index 99% rename from command/client.go rename to mc/client.go index 227ea39c..103367cf 100644 --- a/command/client.go +++ b/mc/client.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "io" diff --git a/command/common-methods.go b/mc/common-methods.go similarity index 99% rename from command/common-methods.go rename to mc/common-methods.go index 0bb00708..85185d12 100644 --- a/command/common-methods.go +++ b/mc/common-methods.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "io" diff --git a/command/config-fix.go b/mc/config-fix.go similarity index 99% rename from command/config-fix.go rename to mc/config-fix.go index feaf8b63..d3da6d6b 100644 --- a/command/config-fix.go +++ b/mc/config-fix.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "fmt" diff --git a/command/config-host-main.go b/mc/config-host-main.go similarity index 99% rename from command/config-host-main.go rename to mc/config-host-main.go index 1985d67a..6c47b2cc 100644 --- a/command/config-host-main.go +++ b/mc/config-host-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "encoding/json" diff --git a/command/config-main.go b/mc/config-main.go similarity index 99% rename from command/config-main.go rename to mc/config-main.go index b02bce24..1fdbfa32 100644 --- a/command/config-main.go +++ b/mc/config-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import "github.com/minio/cli" diff --git a/command/config-migrate.go b/mc/config-migrate.go similarity index 99% rename from command/config-migrate.go rename to mc/config-migrate.go index c0b9db3d..75120937 100644 --- a/command/config-migrate.go +++ b/mc/config-migrate.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "fmt" diff --git a/command/config-old.go b/mc/config-old.go similarity index 99% rename from command/config-old.go rename to mc/config-old.go index f9b057aa..a4e238b5 100644 --- a/command/config-old.go +++ b/mc/config-old.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc /////////////////// Config V1 /////////////////// type hostConfigV1 struct { diff --git a/command/config-utils.go b/mc/config-utils.go similarity index 99% rename from command/config-utils.go rename to mc/config-utils.go index 8385d690..100c85b4 100644 --- a/command/config-utils.go +++ b/mc/config-utils.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "regexp" diff --git a/command/config-v8.go b/mc/config-v8.go similarity index 99% rename from command/config-v8.go rename to mc/config-v8.go index 256cf9c8..8a311353 100644 --- a/command/config-v8.go +++ b/mc/config-v8.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "sync" diff --git a/command/config-validate.go b/mc/config-validate.go similarity index 99% rename from command/config-validate.go rename to mc/config-validate.go index aefcb7ab..9e23b257 100644 --- a/command/config-validate.go +++ b/mc/config-validate.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "bytes" diff --git a/command/config.go b/mc/config.go similarity index 99% rename from command/config.go rename to mc/config.go index be13e3e7..eb591ecc 100644 --- a/command/config.go +++ b/mc/config.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "os" diff --git a/command/cp-main.go b/mc/cp-main.go similarity index 99% rename from command/cp-main.go rename to mc/cp-main.go index 5f070f6e..57d2d6ce 100644 --- a/command/cp-main.go +++ b/mc/cp-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "bufio" diff --git a/command/cp-url-syntax.go b/mc/cp-url-syntax.go similarity index 99% rename from command/cp-url-syntax.go rename to mc/cp-url-syntax.go index 70201b9e..a18146a8 100644 --- a/command/cp-url-syntax.go +++ b/mc/cp-url-syntax.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "fmt" diff --git a/command/cp-url.go b/mc/cp-url.go similarity index 99% rename from command/cp-url.go rename to mc/cp-url.go index ae2adcb1..fba0b23e 100644 --- a/command/cp-url.go +++ b/mc/cp-url.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "path/filepath" diff --git a/command/damerau-levenshtein.go b/mc/damerau-levenshtein.go similarity index 99% rename from command/damerau-levenshtein.go rename to mc/damerau-levenshtein.go index bce228eb..9d81d702 100644 --- a/command/damerau-levenshtein.go +++ b/mc/damerau-levenshtein.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "math" diff --git a/command/diff-main.go b/mc/diff-main.go similarity index 99% rename from command/diff-main.go rename to mc/diff-main.go index f96c7fb7..0df7abd4 100644 --- a/command/diff-main.go +++ b/mc/diff-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "encoding/json" diff --git a/command/difference.go b/mc/difference.go similarity index 99% rename from command/difference.go rename to mc/difference.go index 73e0c693..53566dff 100644 --- a/command/difference.go +++ b/mc/difference.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "fmt" diff --git a/command/error.go b/mc/error.go similarity index 99% rename from command/error.go rename to mc/error.go index 958623f6..34d8b60b 100644 --- a/command/error.go +++ b/mc/error.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "encoding/json" diff --git a/command/flags.go b/mc/flags.go similarity index 98% rename from command/flags.go rename to mc/flags.go index 7c219a91..9514ae06 100644 --- a/command/flags.go +++ b/mc/flags.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import "github.com/minio/cli" diff --git a/command/fs-pathutils.go b/mc/fs-pathutils.go similarity index 97% rename from command/fs-pathutils.go rename to mc/fs-pathutils.go index 519c1bed..9da1e673 100644 --- a/command/fs-pathutils.go +++ b/mc/fs-pathutils.go @@ -16,7 +16,7 @@ * limitations under the License. */ -package command +package mc func normalizePath(path string) string { return path diff --git a/command/fs-pathutils_window.go b/mc/fs-pathutils_window.go similarity index 98% rename from command/fs-pathutils_window.go rename to mc/fs-pathutils_window.go index 0d24cb70..28f947ca 100644 --- a/command/fs-pathutils_window.go +++ b/mc/fs-pathutils_window.go @@ -16,7 +16,7 @@ * limitations under the License. */ -package command +package mc import ( "path/filepath" diff --git a/command/globals.go b/mc/globals.go similarity index 94% rename from command/globals.go rename to mc/globals.go index 0cdf23af..ba703282 100644 --- a/command/globals.go +++ b/mc/globals.go @@ -14,8 +14,8 @@ * limitations under the License. */ -// Package command contains all the global variables and constants. ONLY TO BE ACCESSED VIA GET/SET FUNCTIONS. -package command +// Package mc contains all the global variables and constants. ONLY TO BE ACCESSED VIA GET/SET FUNCTIONS. +package mc import ( "github.com/minio/cli" diff --git a/command/ls-main.go b/mc/ls-main.go similarity index 99% rename from command/ls-main.go rename to mc/ls-main.go index 09768314..cc342efb 100644 --- a/command/ls-main.go +++ b/mc/ls-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "strings" diff --git a/command/ls.go b/mc/ls.go similarity index 99% rename from command/ls.go rename to mc/ls.go index 9f8db4e3..aee6b86d 100644 --- a/command/ls.go +++ b/mc/ls.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "encoding/json" diff --git a/command/ls_test.go b/mc/ls_test.go similarity index 97% rename from command/ls_test.go rename to mc/ls_test.go index 01b64fd9..2adc6137 100644 --- a/command/ls_test.go +++ b/mc/ls_test.go @@ -14,4 +14,4 @@ * limitations under the License. */ -package command +package mc diff --git a/command/main.go b/mc/main.go similarity index 99% rename from command/main.go rename to mc/main.go index 4cf4ba97..5f7de1eb 100644 --- a/command/main.go +++ b/mc/main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "bytes" diff --git a/command/mb-main.go b/mc/mb-main.go similarity index 99% rename from command/mb-main.go rename to mc/mb-main.go index 817d7bce..8276e974 100644 --- a/command/mb-main.go +++ b/mc/mb-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "encoding/json" diff --git a/command/mc_test.go b/mc/mc_test.go similarity index 99% rename from command/mc_test.go rename to mc/mc_test.go index d702daf2..7cdf96f4 100644 --- a/command/mc_test.go +++ b/mc/mc_test.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "path/filepath" diff --git a/command/mirror-main.go b/mc/mirror-main.go similarity index 99% rename from command/mirror-main.go rename to mc/mirror-main.go index 1b681fc7..326e6e96 100644 --- a/command/mirror-main.go +++ b/mc/mirror-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "bufio" diff --git a/command/mirror-url.go b/mc/mirror-url.go similarity index 99% rename from command/mirror-url.go rename to mc/mirror-url.go index 788f45e2..63e8a861 100644 --- a/command/mirror-url.go +++ b/mc/mirror-url.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "fmt" diff --git a/command/notifier.go b/mc/notifier.go similarity index 99% rename from command/notifier.go rename to mc/notifier.go index 0d398ab2..403790b9 100644 --- a/command/notifier.go +++ b/mc/notifier.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "fmt" diff --git a/command/pipe-main.go b/mc/pipe-main.go similarity index 99% rename from command/pipe-main.go rename to mc/pipe-main.go index 69c498b5..902af669 100644 --- a/command/pipe-main.go +++ b/mc/pipe-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "os" diff --git a/command/policy-main.go b/mc/policy-main.go similarity index 99% rename from command/policy-main.go rename to mc/policy-main.go index 116024bd..949f8da7 100644 --- a/command/policy-main.go +++ b/mc/policy-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "encoding/json" diff --git a/command/print.go b/mc/print.go similarity index 98% rename from command/print.go rename to mc/print.go index 8c54d0ec..42dd27e9 100644 --- a/command/print.go +++ b/mc/print.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import "github.com/minio/mc/pkg/console" diff --git a/command/progress-bar.go b/mc/progress-bar.go similarity index 99% rename from command/progress-bar.go rename to mc/progress-bar.go index 733805d5..8d6a28e1 100644 --- a/command/progress-bar.go +++ b/mc/progress-bar.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "io" diff --git a/command/queue.go b/mc/queue.go similarity index 99% rename from command/queue.go rename to mc/queue.go index c9a00031..e8cdf0e8 100644 --- a/command/queue.go +++ b/mc/queue.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "encoding/json" diff --git a/command/rm-main.go b/mc/rm-main.go similarity index 99% rename from command/rm-main.go rename to mc/rm-main.go index 0856bef5..de8e108b 100644 --- a/command/rm-main.go +++ b/mc/rm-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "encoding/json" diff --git a/command/runtime-checks.go b/mc/runtime-checks.go similarity index 98% rename from command/runtime-checks.go rename to mc/runtime-checks.go index ed665e6d..f95dd971 100644 --- a/command/runtime-checks.go +++ b/mc/runtime-checks.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "fmt" diff --git a/command/scan-bar.go b/mc/scan-bar.go similarity index 99% rename from command/scan-bar.go rename to mc/scan-bar.go index bbd5448f..c1fd2e52 100644 --- a/command/scan-bar.go +++ b/mc/scan-bar.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "fmt" diff --git a/command/session-main.go b/mc/session-main.go similarity index 99% rename from command/session-main.go rename to mc/session-main.go index 3921cef9..9e3d45c9 100644 --- a/command/session-main.go +++ b/mc/session-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "encoding/json" diff --git a/command/session-migrate.go b/mc/session-migrate.go similarity index 99% rename from command/session-migrate.go rename to mc/session-migrate.go index 315d1a7f..622b0cf7 100644 --- a/command/session-migrate.go +++ b/mc/session-migrate.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "os" diff --git a/command/session-old.go b/mc/session-old.go similarity index 99% rename from command/session-old.go rename to mc/session-old.go index 0e9d30fa..ead15a3f 100644 --- a/command/session-old.go +++ b/mc/session-old.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "os" diff --git a/command/session-v7.go b/mc/session-v7.go similarity index 99% rename from command/session-v7.go rename to mc/session-v7.go index 2d9f5555..6a202b12 100644 --- a/command/session-v7.go +++ b/mc/session-v7.go @@ -14,9 +14,9 @@ * limitations under the License. */ -// Package command - session V7 - Version 7 stores session header and session data in +// Package mc - session V7 - Version 7 stores session header and session data in // two separate files. Session data contains fully prepared URL list. -package command +package mc import ( "encoding/json" diff --git a/command/session.go b/mc/session.go similarity index 99% rename from command/session.go rename to mc/session.go index d7c07691..f5dbecad 100644 --- a/command/session.go +++ b/mc/session.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "os" diff --git a/command/session_test.go b/mc/session_test.go similarity index 99% rename from command/session_test.go rename to mc/session_test.go index 4923f112..bea701c3 100644 --- a/command/session_test.go +++ b/mc/session_test.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "os" diff --git a/command/share-db-v1.go b/mc/share-db-v1.go similarity index 99% rename from command/share-db-v1.go rename to mc/share-db-v1.go index e79db47c..60d5f258 100644 --- a/command/share-db-v1.go +++ b/mc/share-db-v1.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "os" diff --git a/command/share-download-main.go b/mc/share-download-main.go similarity index 99% rename from command/share-download-main.go rename to mc/share-download-main.go index afa3a36d..ba762617 100644 --- a/command/share-download-main.go +++ b/mc/share-download-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "time" diff --git a/command/share-list-main.go b/mc/share-list-main.go similarity index 99% rename from command/share-list-main.go rename to mc/share-list-main.go index abfdc4c2..1a7a7749 100644 --- a/command/share-list-main.go +++ b/mc/share-list-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "fmt" diff --git a/command/share-main.go b/mc/share-main.go similarity index 99% rename from command/share-main.go rename to mc/share-main.go index 04a46aaf..e70387f9 100644 --- a/command/share-main.go +++ b/mc/share-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "os" diff --git a/command/share-upload-main.go b/mc/share-upload-main.go similarity index 99% rename from command/share-upload-main.go rename to mc/share-upload-main.go index 60cf3396..fe334b78 100644 --- a/command/share-upload-main.go +++ b/mc/share-upload-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "fmt" diff --git a/command/share.go b/mc/share.go similarity index 99% rename from command/share.go rename to mc/share.go index be52012d..41c550a1 100644 --- a/command/share.go +++ b/mc/share.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "bytes" diff --git a/command/signals.go b/mc/signals.go similarity index 98% rename from command/signals.go rename to mc/signals.go index 55a3fa72..a7a6f9d3 100644 --- a/command/signals.go +++ b/mc/signals.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "os" diff --git a/command/status.go b/mc/status.go similarity index 99% rename from command/status.go rename to mc/status.go index b3c9191d..da6dade9 100644 --- a/command/status.go +++ b/mc/status.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "github.com/minio/mc/pkg/console" diff --git a/command/time.go b/mc/time.go similarity index 99% rename from command/time.go rename to mc/time.go index 66cea8bb..267e9f05 100644 --- a/command/time.go +++ b/mc/time.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "fmt" diff --git a/command/trie.go b/mc/trie.go similarity index 95% rename from command/trie.go rename to mc/trie.go index 484b9e63..54feeeff 100644 --- a/command/trie.go +++ b/mc/trie.go @@ -14,8 +14,8 @@ * limitations under the License. */ -// Package command - This file implements a simple trie tree to be used for 'mc' cli commands. -package command +// Package mc - This file implements a simple trie tree to be used for 'mc' cli commands. +package mc // This package borrows idea from - https://godoc.org/golang.org/x/text/internal/triegen. diff --git a/command/typed-errors.go b/mc/typed-errors.go similarity index 99% rename from command/typed-errors.go rename to mc/typed-errors.go index 5330e331..abc1dffc 100644 --- a/command/typed-errors.go +++ b/mc/typed-errors.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "errors" diff --git a/command/update-main.go b/mc/update-main.go similarity index 99% rename from command/update-main.go rename to mc/update-main.go index 5231b76c..0b5f0138 100644 --- a/command/update-main.go +++ b/mc/update-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "encoding/json" diff --git a/command/urls.go b/mc/urls.go similarity index 99% rename from command/urls.go rename to mc/urls.go index a2004e3a..af8a5f16 100644 --- a/command/urls.go +++ b/mc/urls.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import "github.com/minio/minio/pkg/probe" diff --git a/command/utils.go b/mc/utils.go similarity index 98% rename from command/utils.go rename to mc/utils.go index 4bb4476d..182b2b4e 100644 --- a/command/utils.go +++ b/mc/utils.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "math/rand" diff --git a/command/version-main.go b/mc/version-main.go similarity index 99% rename from command/version-main.go rename to mc/version-main.go index 2061a5d5..4c256c70 100644 --- a/command/version-main.go +++ b/mc/version-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "encoding/json" diff --git a/command/version_test.go b/mc/version_test.go similarity index 97% rename from command/version_test.go rename to mc/version_test.go index bff321f8..7850522a 100644 --- a/command/version_test.go +++ b/mc/version_test.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "net/http" diff --git a/command/watch.go b/mc/watch.go similarity index 99% rename from command/watch.go rename to mc/watch.go index 6a949115..0ae90b22 100644 --- a/command/watch.go +++ b/mc/watch.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package command +package mc import ( "fmt"