mirror of
https://github.com/minio/mc.git
synced 2025-11-13 12:22:45 +03:00
- over the course of a project history every maintainer needs to update
its dependency packages, the problem essentially with godep is manipulating
GOPATH - this manipulation leads to static objects created at different locations
which end up conflicting with the overall functionality of golang.
This also leads to broken builds on many platforms. There is no easier way out of
this other than asking users to do 'godep restore' all the time which perhaps as
a practice doesn't sound clean, also has its own set of problems.
- govendor on the other hand is a right tool but a stop gap tool until we wait for
golangs official 1.5 version which fixes this vendoring issue once and for all.
- govendor makes sure that the import paths are re-written instead of manipulating
GOPATH.
This has advantages
- no more compiled objects being referenced in GOPATH and build time GOPATH
manging which leads to conflicts.
- proper import paths referencing the exact package a project is dependent on.
govendor is simple and provides the minimal necessary tooling to achieve this.
For now this is the right solution.
162 lines
3.6 KiB
Go
162 lines
3.6 KiB
Go
/*
|
||
* Minio Client (C) 2014, 2015 Minio, Inc.
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/
|
||
|
||
package main
|
||
|
||
type errUnexpected struct{}
|
||
|
||
func (e errUnexpected) Error() string {
|
||
return "Unexpected control flow, please report this bug at https://github.com/minio/mc/issues."
|
||
}
|
||
|
||
type errInvalidSessionID struct {
|
||
id string
|
||
}
|
||
|
||
func (e errInvalidSessionID) Error() string {
|
||
return "Invalid session id ‘" + e.id + "’."
|
||
}
|
||
|
||
type errInvalidACL struct {
|
||
acl string
|
||
}
|
||
|
||
func (e errInvalidACL) Error() string {
|
||
return "Invalid ACL Type ‘" + e.acl + "’. Valid types are [private, public, readonly]."
|
||
}
|
||
|
||
type errNotAnObject struct {
|
||
url string
|
||
}
|
||
|
||
func (e errNotAnObject) Error() string {
|
||
return "URL: ‘" + e.url + "’ not an object"
|
||
}
|
||
|
||
type errInvalidArgument struct{}
|
||
|
||
func (e errInvalidArgument) Error() string {
|
||
return "Incorrect usage, please use \"mc config help\""
|
||
}
|
||
|
||
type errInvalidGlobURL struct {
|
||
glob string
|
||
request string
|
||
}
|
||
|
||
func (e errInvalidGlobURL) Error() string {
|
||
return "Error reading glob URL " + e.glob + " while comparing with " + e.request
|
||
}
|
||
|
||
type errReservedAliasName struct {
|
||
alias string
|
||
}
|
||
|
||
func (e errReservedAliasName) Error() string {
|
||
return "Alias name ‘" + e.alias + "’ is a reserved word, reserved words are [help, private, readonly, public, authenticated]"
|
||
}
|
||
|
||
type errInvalidAliasName struct {
|
||
alias string
|
||
}
|
||
|
||
func (e errInvalidAliasName) Error() string {
|
||
return "Alias name ‘" + e.alias + "’ is invalid, valid examples are: Area51, Grand-Nagus.."
|
||
}
|
||
|
||
type errNoMatchingHost struct {
|
||
url string
|
||
}
|
||
|
||
func (e errNoMatchingHost) Error() string {
|
||
return "No matching host found for the given url ‘" + e.url + "’"
|
||
}
|
||
|
||
// errAliasExists - alias exists
|
||
type errAliasExists struct {
|
||
alias string
|
||
}
|
||
|
||
func (e errAliasExists) Error() string {
|
||
return "Alias name: ‘" + e.alias + "’ already exists."
|
||
}
|
||
|
||
type errInitClient struct {
|
||
url string
|
||
}
|
||
|
||
func (e errInitClient) Error() string {
|
||
return "Unable to initialize client for url ‘" + e.url + "’"
|
||
}
|
||
|
||
type errInvalidURL struct {
|
||
URL string
|
||
}
|
||
|
||
func (e errInvalidURL) Error() string {
|
||
return "Invalid url " + e.URL
|
||
}
|
||
|
||
type errInvalidSource errInvalidURL
|
||
|
||
func (e errInvalidSource) Error() string {
|
||
return "Invalid source " + e.URL
|
||
}
|
||
|
||
type errInvalidTarget errInvalidURL
|
||
|
||
func (e errInvalidTarget) Error() string {
|
||
return "Invalid target " + e.URL
|
||
}
|
||
|
||
type errInvalidTheme struct {
|
||
Theme string
|
||
}
|
||
|
||
func (e errInvalidTheme) Error() string {
|
||
return "Theme " + e.Theme + " is not supported."
|
||
}
|
||
|
||
type errTargetIsNotDir errInvalidURL
|
||
|
||
func (e errTargetIsNotDir) Error() string {
|
||
return "Target ‘" + e.URL + "’ is not a folder."
|
||
}
|
||
|
||
type errSourceNotRecursive errInvalidURL
|
||
|
||
func (e errSourceNotRecursive) Error() string {
|
||
return "Source ‘" + e.URL + "’ is not recursive."
|
||
}
|
||
|
||
type errSourceIsNotDir errTargetIsNotDir
|
||
|
||
func (e errSourceIsNotDir) Error() string {
|
||
return "Source ‘" + e.URL + "’ is not a folder."
|
||
}
|
||
|
||
type errSourceIsNotFile errTargetIsNotDir
|
||
|
||
func (e errSourceIsNotFile) Error() string {
|
||
return "Source ‘" + e.URL + "’ is not a file."
|
||
}
|
||
|
||
type errSourceListEmpty errInvalidArgument
|
||
|
||
func (e errSourceListEmpty) Error() string {
|
||
return "Source list is empty."
|
||
}
|