diff --git a/Makefile b/Makefile index 33f89009..1e0d478f 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 ./mc + @GO15VENDOREXPERIMENT=1 go tool vet -all ./cmd @GO15VENDOREXPERIMENT=1 go tool vet -all ./pkg @GO15VENDOREXPERIMENT=1 go tool vet -shadow=true *.go - @GO15VENDOREXPERIMENT=1 go tool vet -shadow=true ./mc + @GO15VENDOREXPERIMENT=1 go tool vet -shadow=true ./cmd @GO15VENDOREXPERIMENT=1 go tool vet -shadow=true ./pkg spelling: @GO15VENDOREXPERIMENT=1 ${GOPATH}/bin/misspell *.go - @GO15VENDOREXPERIMENT=1 ${GOPATH}/bin/misspell mc/* + @GO15VENDOREXPERIMENT=1 ${GOPATH}/bin/misspell cmd/* @GO15VENDOREXPERIMENT=1 ${GOPATH}/bin/misspell pkg/**/* fmt: @echo "Running $@:" @GO15VENDOREXPERIMENT=1 gofmt -s -l *.go - @GO15VENDOREXPERIMENT=1 gofmt -s -l mc + @GO15VENDOREXPERIMENT=1 gofmt -s -l cmd @GO15VENDOREXPERIMENT=1 gofmt -s -l pkg lint: @echo "Running $@:" @GO15VENDOREXPERIMENT=1 $(GOPATH)/bin/golint . - @GO15VENDOREXPERIMENT=1 $(GOPATH)/bin/golint github.com/minio/mc/mc... + @GO15VENDOREXPERIMENT=1 $(GOPATH)/bin/golint github.com/minio/mc/cmd... @GO15VENDOREXPERIMENT=1 $(GOPATH)/bin/golint github.com/minio/mc/pkg... cyclo: @echo "Running $@:" - @GO15VENDOREXPERIMENT=1 $(GOPATH)/bin/gocyclo -over 40 mc + @GO15VENDOREXPERIMENT=1 $(GOPATH)/bin/gocyclo -over 40 cmd @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/mc... + @GO15VENDOREXPERIMENT=1 go test $(GOFLAGS) github.com/minio/mc/cmd... @GO15VENDOREXPERIMENT=1 go test $(GOFLAGS) github.com/minio/mc/pkg... gomake-all: build diff --git a/mc/access-perms.go b/cmd/access-perms.go similarity index 98% rename from mc/access-perms.go rename to cmd/access-perms.go index 4c9702d9..62a9ea9c 100644 --- a/mc/access-perms.go +++ b/cmd/access-perms.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd // isValidAccessPERM - is provided access perm string supported. func (b accessPerms) isValidAccessPERM() bool { diff --git a/mc/accounting-reader.go b/cmd/accounting-reader.go similarity index 99% rename from mc/accounting-reader.go rename to cmd/accounting-reader.go index 33b3fb2f..ad3ce6e4 100644 --- a/mc/accounting-reader.go +++ b/cmd/accounting-reader.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "sync" diff --git a/mc/api_handlers_test.go b/cmd/api_handlers_test.go similarity index 99% rename from mc/api_handlers_test.go rename to cmd/api_handlers_test.go index 00a815ca..8f9c37ae 100644 --- a/mc/api_handlers_test.go +++ b/cmd/api_handlers_test.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "bytes" diff --git a/mc/build-constants.go b/cmd/build-constants.go similarity index 98% rename from mc/build-constants.go rename to cmd/build-constants.go index 415c9d36..3c096c17 100644 --- a/mc/build-constants.go +++ b/cmd/build-constants.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd var ( // MCVersion - version time.RFC3339. diff --git a/mc/cat-main.go b/cmd/cat-main.go similarity index 99% rename from mc/cat-main.go rename to cmd/cat-main.go index a78b02b9..6106d4ec 100644 --- a/mc/cat-main.go +++ b/cmd/cat-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "errors" diff --git a/mc/client-errors.go b/cmd/client-errors.go similarity index 99% rename from mc/client-errors.go rename to cmd/client-errors.go index 6747c727..70321d42 100644 --- a/mc/client-errors.go +++ b/cmd/client-errors.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import "fmt" diff --git a/mc/client-fs.go b/cmd/client-fs.go similarity index 99% rename from mc/client-fs.go rename to cmd/client-fs.go index ec6cae7d..6bfd1187 100644 --- a/mc/client-fs.go +++ b/cmd/client-fs.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "io" diff --git a/mc/client-fs_test.go b/cmd/client-fs_test.go similarity index 99% rename from mc/client-fs_test.go rename to cmd/client-fs_test.go index 3c1b98be..baa1100b 100644 --- a/mc/client-fs_test.go +++ b/cmd/client-fs_test.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "bytes" diff --git a/mc/client-s3-trace_v2.go b/cmd/client-s3-trace_v2.go similarity index 99% rename from mc/client-s3-trace_v2.go rename to cmd/client-s3-trace_v2.go index fdbe03f6..e876d132 100644 --- a/mc/client-s3-trace_v2.go +++ b/cmd/client-s3-trace_v2.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "bytes" diff --git a/mc/client-s3-trace_v4.go b/cmd/client-s3-trace_v4.go similarity index 99% rename from mc/client-s3-trace_v4.go rename to cmd/client-s3-trace_v4.go index d516b105..df5a1cb9 100644 --- a/mc/client-s3-trace_v4.go +++ b/cmd/client-s3-trace_v4.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "bytes" diff --git a/mc/client-s3.go b/cmd/client-s3.go similarity index 99% rename from mc/client-s3.go rename to cmd/client-s3.go index c107c69d..ae55a3b1 100644 --- a/mc/client-s3.go +++ b/cmd/client-s3.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "errors" diff --git a/mc/client-s3_test.go b/cmd/client-s3_test.go similarity index 99% rename from mc/client-s3_test.go rename to cmd/client-s3_test.go index ee00db53..3a980781 100644 --- a/mc/client-s3_test.go +++ b/cmd/client-s3_test.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd // bucketHandler is an http.Handler that verifies bucket responses and validates incoming requests import ( diff --git a/mc/client-url.go b/cmd/client-url.go similarity index 99% rename from mc/client-url.go rename to cmd/client-url.go index 93f2115c..c9e8973d 100644 --- a/mc/client-url.go +++ b/cmd/client-url.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "bytes" diff --git a/mc/client-url_test.go b/cmd/client-url_test.go similarity index 99% rename from mc/client-url_test.go rename to cmd/client-url_test.go index d39980b2..b1a26d93 100644 --- a/mc/client-url_test.go +++ b/cmd/client-url_test.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import . "gopkg.in/check.v1" diff --git a/mc/client.go b/cmd/client.go similarity index 99% rename from mc/client.go rename to cmd/client.go index acb2446d..2c78301a 100644 --- a/mc/client.go +++ b/cmd/client.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "io" diff --git a/mc/common-methods.go b/cmd/common-methods.go similarity index 99% rename from mc/common-methods.go rename to cmd/common-methods.go index 85185d12..217c807b 100644 --- a/mc/common-methods.go +++ b/cmd/common-methods.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "io" diff --git a/mc/config-fix.go b/cmd/config-fix.go similarity index 99% rename from mc/config-fix.go rename to cmd/config-fix.go index d3da6d6b..7a4ab1d6 100644 --- a/mc/config-fix.go +++ b/cmd/config-fix.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "fmt" diff --git a/mc/config-host-main.go b/cmd/config-host-main.go similarity index 99% rename from mc/config-host-main.go rename to cmd/config-host-main.go index 6c47b2cc..2dac3ae0 100644 --- a/mc/config-host-main.go +++ b/cmd/config-host-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "encoding/json" diff --git a/mc/config-main.go b/cmd/config-main.go similarity index 99% rename from mc/config-main.go rename to cmd/config-main.go index 1fdbfa32..cca59e07 100644 --- a/mc/config-main.go +++ b/cmd/config-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import "github.com/minio/cli" diff --git a/mc/config-migrate.go b/cmd/config-migrate.go similarity index 99% rename from mc/config-migrate.go rename to cmd/config-migrate.go index 75120937..99d5dd1d 100644 --- a/mc/config-migrate.go +++ b/cmd/config-migrate.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "fmt" diff --git a/mc/config-old.go b/cmd/config-old.go similarity index 99% rename from mc/config-old.go rename to cmd/config-old.go index a4e238b5..83293ff7 100644 --- a/mc/config-old.go +++ b/cmd/config-old.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd /////////////////// Config V1 /////////////////// type hostConfigV1 struct { diff --git a/mc/config-utils.go b/cmd/config-utils.go similarity index 99% rename from mc/config-utils.go rename to cmd/config-utils.go index 100c85b4..92104d83 100644 --- a/mc/config-utils.go +++ b/cmd/config-utils.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "regexp" diff --git a/mc/config-v8.go b/cmd/config-v8.go similarity index 99% rename from mc/config-v8.go rename to cmd/config-v8.go index 8a311353..56555289 100644 --- a/mc/config-v8.go +++ b/cmd/config-v8.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "sync" diff --git a/mc/config-validate.go b/cmd/config-validate.go similarity index 99% rename from mc/config-validate.go rename to cmd/config-validate.go index 9e23b257..91b3264c 100644 --- a/mc/config-validate.go +++ b/cmd/config-validate.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "bytes" diff --git a/mc/config.go b/cmd/config.go similarity index 99% rename from mc/config.go rename to cmd/config.go index eb591ecc..db731d9c 100644 --- a/mc/config.go +++ b/cmd/config.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "os" diff --git a/mc/cp-main.go b/cmd/cp-main.go similarity index 99% rename from mc/cp-main.go rename to cmd/cp-main.go index 57d2d6ce..83b49858 100644 --- a/mc/cp-main.go +++ b/cmd/cp-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "bufio" diff --git a/mc/cp-url-syntax.go b/cmd/cp-url-syntax.go similarity index 99% rename from mc/cp-url-syntax.go rename to cmd/cp-url-syntax.go index a18146a8..3645f8af 100644 --- a/mc/cp-url-syntax.go +++ b/cmd/cp-url-syntax.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "fmt" diff --git a/mc/cp-url.go b/cmd/cp-url.go similarity index 99% rename from mc/cp-url.go rename to cmd/cp-url.go index fba0b23e..8320f6dc 100644 --- a/mc/cp-url.go +++ b/cmd/cp-url.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "path/filepath" diff --git a/mc/damerau-levenshtein.go b/cmd/damerau-levenshtein.go similarity index 99% rename from mc/damerau-levenshtein.go rename to cmd/damerau-levenshtein.go index 9d81d702..fcf38fe2 100644 --- a/mc/damerau-levenshtein.go +++ b/cmd/damerau-levenshtein.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "math" diff --git a/mc/diff-main.go b/cmd/diff-main.go similarity index 99% rename from mc/diff-main.go rename to cmd/diff-main.go index 0df7abd4..fc9bea91 100644 --- a/mc/diff-main.go +++ b/cmd/diff-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "encoding/json" diff --git a/mc/difference.go b/cmd/difference.go similarity index 99% rename from mc/difference.go rename to cmd/difference.go index 53566dff..e4f38e6e 100644 --- a/mc/difference.go +++ b/cmd/difference.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "fmt" diff --git a/mc/error.go b/cmd/error.go similarity index 99% rename from mc/error.go rename to cmd/error.go index 34d8b60b..dc609b7d 100644 --- a/mc/error.go +++ b/cmd/error.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "encoding/json" diff --git a/mc/events-add.go b/cmd/events-add.go similarity index 99% rename from mc/events-add.go rename to cmd/events-add.go index 3d82cb33..13103cf7 100644 --- a/mc/events-add.go +++ b/cmd/events-add.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "encoding/json" diff --git a/mc/events-list.go b/cmd/events-list.go similarity index 99% rename from mc/events-list.go rename to cmd/events-list.go index d99e6af3..ef6a747c 100644 --- a/mc/events-list.go +++ b/cmd/events-list.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "encoding/json" diff --git a/mc/events-main.go b/cmd/events-main.go similarity index 99% rename from mc/events-main.go rename to cmd/events-main.go index 0868e8e6..d31460ea 100644 --- a/mc/events-main.go +++ b/cmd/events-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import "github.com/minio/cli" diff --git a/mc/events-remove.go b/cmd/events-remove.go similarity index 99% rename from mc/events-remove.go rename to cmd/events-remove.go index 797a30e8..98ac95ba 100644 --- a/mc/events-remove.go +++ b/cmd/events-remove.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "encoding/json" diff --git a/mc/flags.go b/cmd/flags.go similarity index 99% rename from mc/flags.go rename to cmd/flags.go index 9514ae06..ab6103bd 100644 --- a/mc/flags.go +++ b/cmd/flags.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import "github.com/minio/cli" diff --git a/mc/fs-pathutils.go b/cmd/fs-pathutils.go similarity index 98% rename from mc/fs-pathutils.go rename to cmd/fs-pathutils.go index 9da1e673..1c103de3 100644 --- a/mc/fs-pathutils.go +++ b/cmd/fs-pathutils.go @@ -16,7 +16,7 @@ * limitations under the License. */ -package mc +package cmd func normalizePath(path string) string { return path diff --git a/mc/fs-pathutils_window.go b/cmd/fs-pathutils_window.go similarity index 98% rename from mc/fs-pathutils_window.go rename to cmd/fs-pathutils_window.go index 28f947ca..9e51fd12 100644 --- a/mc/fs-pathutils_window.go +++ b/cmd/fs-pathutils_window.go @@ -16,7 +16,7 @@ * limitations under the License. */ -package mc +package cmd import ( "path/filepath" diff --git a/mc/globals.go b/cmd/globals.go similarity index 95% rename from mc/globals.go rename to cmd/globals.go index ba703282..eeab2624 100644 --- a/mc/globals.go +++ b/cmd/globals.go @@ -14,8 +14,8 @@ * limitations under the License. */ -// Package mc contains all the global variables and constants. ONLY TO BE ACCESSED VIA GET/SET FUNCTIONS. -package mc +// Package cmd contains all the global variables and constants. ONLY TO BE ACCESSED VIA GET/SET FUNCTIONS. +package cmd import ( "github.com/minio/cli" diff --git a/mc/ls-main.go b/cmd/ls-main.go similarity index 99% rename from mc/ls-main.go rename to cmd/ls-main.go index cc342efb..387f0677 100644 --- a/mc/ls-main.go +++ b/cmd/ls-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "strings" diff --git a/mc/ls.go b/cmd/ls.go similarity index 99% rename from mc/ls.go rename to cmd/ls.go index aee6b86d..8953ae4c 100644 --- a/mc/ls.go +++ b/cmd/ls.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "encoding/json" diff --git a/mc/ls_test.go b/cmd/ls_test.go similarity index 98% rename from mc/ls_test.go rename to cmd/ls_test.go index 2adc6137..945c11a1 100644 --- a/mc/ls_test.go +++ b/cmd/ls_test.go @@ -14,4 +14,4 @@ * limitations under the License. */ -package mc +package cmd diff --git a/mc/main.go b/cmd/main.go similarity index 99% rename from mc/main.go rename to cmd/main.go index c1bc0d80..de62b3a4 100644 --- a/mc/main.go +++ b/cmd/main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "bytes" diff --git a/mc/mb-main.go b/cmd/mb-main.go similarity index 99% rename from mc/mb-main.go rename to cmd/mb-main.go index 8276e974..b79d7f28 100644 --- a/mc/mb-main.go +++ b/cmd/mb-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "encoding/json" diff --git a/mc/mc_test.go b/cmd/mc_test.go similarity index 99% rename from mc/mc_test.go rename to cmd/mc_test.go index 7cdf96f4..3976d2a8 100644 --- a/mc/mc_test.go +++ b/cmd/mc_test.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "path/filepath" diff --git a/mc/mirror-main.go b/cmd/mirror-main.go similarity index 99% rename from mc/mirror-main.go rename to cmd/mirror-main.go index fedf1c7d..30237464 100644 --- a/mc/mirror-main.go +++ b/cmd/mirror-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "bufio" diff --git a/mc/mirror-url.go b/cmd/mirror-url.go similarity index 99% rename from mc/mirror-url.go rename to cmd/mirror-url.go index 63e8a861..818cd6b8 100644 --- a/mc/mirror-url.go +++ b/cmd/mirror-url.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "fmt" diff --git a/mc/notifier.go b/cmd/notifier.go similarity index 99% rename from mc/notifier.go rename to cmd/notifier.go index 403790b9..a571b7e2 100644 --- a/mc/notifier.go +++ b/cmd/notifier.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "fmt" diff --git a/mc/pipe-main.go b/cmd/pipe-main.go similarity index 99% rename from mc/pipe-main.go rename to cmd/pipe-main.go index 902af669..0df4d8fe 100644 --- a/mc/pipe-main.go +++ b/cmd/pipe-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "os" diff --git a/mc/policy-main.go b/cmd/policy-main.go similarity index 99% rename from mc/policy-main.go rename to cmd/policy-main.go index 949f8da7..b6e81f41 100644 --- a/mc/policy-main.go +++ b/cmd/policy-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "encoding/json" diff --git a/mc/print.go b/cmd/print.go similarity index 98% rename from mc/print.go rename to cmd/print.go index 42dd27e9..35350fa6 100644 --- a/mc/print.go +++ b/cmd/print.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import "github.com/minio/mc/pkg/console" diff --git a/mc/progress-bar.go b/cmd/progress-bar.go similarity index 99% rename from mc/progress-bar.go rename to cmd/progress-bar.go index 8d6a28e1..c9672ef2 100644 --- a/mc/progress-bar.go +++ b/cmd/progress-bar.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "io" diff --git a/mc/queue.go b/cmd/queue.go similarity index 99% rename from mc/queue.go rename to cmd/queue.go index e8cdf0e8..79d2aa85 100644 --- a/mc/queue.go +++ b/cmd/queue.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "encoding/json" diff --git a/mc/rm-main.go b/cmd/rm-main.go similarity index 99% rename from mc/rm-main.go rename to cmd/rm-main.go index de8e108b..2d61db82 100644 --- a/mc/rm-main.go +++ b/cmd/rm-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "encoding/json" diff --git a/mc/runtime-checks.go b/cmd/runtime-checks.go similarity index 99% rename from mc/runtime-checks.go rename to cmd/runtime-checks.go index f95dd971..c87ac885 100644 --- a/mc/runtime-checks.go +++ b/cmd/runtime-checks.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "fmt" diff --git a/mc/scan-bar.go b/cmd/scan-bar.go similarity index 99% rename from mc/scan-bar.go rename to cmd/scan-bar.go index c1fd2e52..99d64b8f 100644 --- a/mc/scan-bar.go +++ b/cmd/scan-bar.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "fmt" diff --git a/mc/session-main.go b/cmd/session-main.go similarity index 99% rename from mc/session-main.go rename to cmd/session-main.go index 9e3d45c9..4c195046 100644 --- a/mc/session-main.go +++ b/cmd/session-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "encoding/json" diff --git a/mc/session-migrate.go b/cmd/session-migrate.go similarity index 99% rename from mc/session-migrate.go rename to cmd/session-migrate.go index 622b0cf7..136ac12e 100644 --- a/mc/session-migrate.go +++ b/cmd/session-migrate.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "os" diff --git a/mc/session-old.go b/cmd/session-old.go similarity index 99% rename from mc/session-old.go rename to cmd/session-old.go index ead15a3f..b5eec65d 100644 --- a/mc/session-old.go +++ b/cmd/session-old.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "os" diff --git a/mc/session-v7.go b/cmd/session-v7.go similarity index 99% rename from mc/session-v7.go rename to cmd/session-v7.go index 6a202b12..7e677c35 100644 --- a/mc/session-v7.go +++ b/cmd/session-v7.go @@ -14,9 +14,9 @@ * limitations under the License. */ -// Package mc - session V7 - Version 7 stores session header and session data in +// Package cmd - session V7 - Version 7 stores session header and session data in // two separate files. Session data contains fully prepared URL list. -package mc +package cmd import ( "encoding/json" diff --git a/mc/session.go b/cmd/session.go similarity index 99% rename from mc/session.go rename to cmd/session.go index f5dbecad..18f379e3 100644 --- a/mc/session.go +++ b/cmd/session.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "os" diff --git a/mc/session_test.go b/cmd/session_test.go similarity index 99% rename from mc/session_test.go rename to cmd/session_test.go index bea701c3..c3a917fc 100644 --- a/mc/session_test.go +++ b/cmd/session_test.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "os" diff --git a/mc/share-db-v1.go b/cmd/share-db-v1.go similarity index 99% rename from mc/share-db-v1.go rename to cmd/share-db-v1.go index 60d5f258..06c8a717 100644 --- a/mc/share-db-v1.go +++ b/cmd/share-db-v1.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "os" diff --git a/mc/share-download-main.go b/cmd/share-download-main.go similarity index 99% rename from mc/share-download-main.go rename to cmd/share-download-main.go index ba762617..0fe6fc81 100644 --- a/mc/share-download-main.go +++ b/cmd/share-download-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "time" diff --git a/mc/share-list-main.go b/cmd/share-list-main.go similarity index 99% rename from mc/share-list-main.go rename to cmd/share-list-main.go index 1a7a7749..b102dba8 100644 --- a/mc/share-list-main.go +++ b/cmd/share-list-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "fmt" diff --git a/mc/share-main.go b/cmd/share-main.go similarity index 99% rename from mc/share-main.go rename to cmd/share-main.go index e70387f9..c5af0fcb 100644 --- a/mc/share-main.go +++ b/cmd/share-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "os" diff --git a/mc/share-upload-main.go b/cmd/share-upload-main.go similarity index 99% rename from mc/share-upload-main.go rename to cmd/share-upload-main.go index fe334b78..5d62123b 100644 --- a/mc/share-upload-main.go +++ b/cmd/share-upload-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "fmt" diff --git a/mc/share.go b/cmd/share.go similarity index 99% rename from mc/share.go rename to cmd/share.go index 41c550a1..d1293dc0 100644 --- a/mc/share.go +++ b/cmd/share.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "bytes" diff --git a/mc/signals.go b/cmd/signals.go similarity index 99% rename from mc/signals.go rename to cmd/signals.go index a7a6f9d3..2431671d 100644 --- a/mc/signals.go +++ b/cmd/signals.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "os" diff --git a/mc/status.go b/cmd/status.go similarity index 99% rename from mc/status.go rename to cmd/status.go index da6dade9..8a335482 100644 --- a/mc/status.go +++ b/cmd/status.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "github.com/minio/mc/pkg/console" diff --git a/mc/time.go b/cmd/time.go similarity index 99% rename from mc/time.go rename to cmd/time.go index 267e9f05..bb0658d2 100644 --- a/mc/time.go +++ b/cmd/time.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "fmt" diff --git a/mc/trie.go b/cmd/trie.go similarity index 95% rename from mc/trie.go rename to cmd/trie.go index 54feeeff..764c23a4 100644 --- a/mc/trie.go +++ b/cmd/trie.go @@ -14,8 +14,8 @@ * limitations under the License. */ -// Package mc - This file implements a simple trie tree to be used for 'mc' cli commands. -package mc +// Package cmd - This file implements a simple trie tree to be used for 'mc' cli commands. +package cmd // This package borrows idea from - https://godoc.org/golang.org/x/text/internal/triegen. diff --git a/mc/typed-errors.go b/cmd/typed-errors.go similarity index 99% rename from mc/typed-errors.go rename to cmd/typed-errors.go index abc1dffc..6bd5e858 100644 --- a/mc/typed-errors.go +++ b/cmd/typed-errors.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "errors" diff --git a/mc/update-main.go b/cmd/update-main.go similarity index 99% rename from mc/update-main.go rename to cmd/update-main.go index 0b5f0138..33f18a19 100644 --- a/mc/update-main.go +++ b/cmd/update-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "encoding/json" diff --git a/mc/urls.go b/cmd/urls.go similarity index 99% rename from mc/urls.go rename to cmd/urls.go index af8a5f16..de2646cd 100644 --- a/mc/urls.go +++ b/cmd/urls.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import "github.com/minio/minio/pkg/probe" diff --git a/mc/utils.go b/cmd/utils.go similarity index 99% rename from mc/utils.go rename to cmd/utils.go index 182b2b4e..277b0143 100644 --- a/mc/utils.go +++ b/cmd/utils.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "math/rand" diff --git a/mc/version-main.go b/cmd/version-main.go similarity index 99% rename from mc/version-main.go rename to cmd/version-main.go index 4c256c70..61def175 100644 --- a/mc/version-main.go +++ b/cmd/version-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "encoding/json" diff --git a/mc/version_test.go b/cmd/version_test.go similarity index 98% rename from mc/version_test.go rename to cmd/version_test.go index 7850522a..2592d91f 100644 --- a/mc/version_test.go +++ b/cmd/version_test.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "net/http" diff --git a/mc/watch-main.go b/cmd/watch-main.go similarity index 99% rename from mc/watch-main.go rename to cmd/watch-main.go index b80d9ebe..eacb5bec 100644 --- a/mc/watch-main.go +++ b/cmd/watch-main.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "encoding/json" diff --git a/mc/watch.go b/cmd/watch.go similarity index 99% rename from mc/watch.go rename to cmd/watch.go index 3a2f219d..063ed39c 100644 --- a/mc/watch.go +++ b/cmd/watch.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package mc +package cmd import ( "fmt" diff --git a/main.go b/main.go index ba1f21dc..0d2e12e2 100644 --- a/main.go +++ b/main.go @@ -16,7 +16,7 @@ package main -import mc "github.com/minio/mc/mc" +import mc "github.com/minio/mc/cmd" func main() { mc.Main()