* Upgrade go version in CI.
* Add toolchain to pin version.
* Add linter/fumpt as pinned version in tools.
* Run `go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test ./...`
allow users to avoid list() call when an object does not
exist when following flags are used with `mc stat`
```
--no-list (HEAD the latest version)
--version-id <vid>
```
Also avoid superflous url2Stat() calls while processing
the args, there is no real reason to do that.
isURLPrefixExists() is used after url2Stat() function to check if the
given aliased URL corresponds to an existing prefix in the server. However,
url2Stat() is already doing that and returns valid information for
those prefixes.
Removing isURLPrefixExists() all together.
strings.ReplaceAll(s, old, new) is a wrapper function for
strings.Replace(s, old, new, -1). But strings.ReplaceAll is more
readable and removes the hardcoded -1.
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
- fixes errant top level directory creation, regression introduced in #3313
- fixes `mc ls -r` regression introduced in #3476
- fixes other bugs such as `mc mirror` would perpetually hang if the
destination bucket doesn't exist, create and proceed instead.
- removes DirOpt style implementations for List, ListIncompleteUploads
these are not useful anymore.
--rewind will go back in time and select specific object versions that are
the latest at the specified time.
--versions will display all the versions
cp will just ignore if the latest version is a delete marker
ls will print delete markers with a (deleted) at the end
Stat() is supposed to return valid information for existing
objects and existing prefixes as well.
The current mechanism issues a listing request and searches
for the object or prefix in the returned list, but this could take
time if there are a lot of entries under a parent prefix.
The new commit changes the internal behavior but not the
functional output. It issues a HEAD request first, if there
is no object then assumes it is a prefix and does listing
in order to find it.
Currently even if the command supports encrypted objects,
the syntax verification would fail on them in certain
cases. Since syntax validation of source/targets doesn't
use the parsed encrypt key pairs. This PR fixes this
behavior.
The probe package is no longer available in the Minio server
repo. This change just moves probe from the vendor directory to its
own dir under `pkg`.
This is a maintenance fix.
Previously it was failing like below.
```
$ mc ls --incomplete myminio/mybucket
[2016-09-16 09:48:57 PDT] 576MiB 1.iso
$ mc ls --incomplete myminio/mybucket/1.iso
mc: <ERROR> Unable to initialize target ‘myminio/mybucket/1.iso’. Object key is missing, object key cannot be empty
```
This patch fixes this issue.