Commit Graph

2 Commits

Author SHA1 Message Date
Kir Kolyshkin 99beb2ca02 pkg/mount: deprecate
Add a deprecation/removal notice, pointing out to appropriate
replacement packages.

I was not sure if a package-level deprecation is enough, so
I also added notices around each block.

Note that `nolint:golint` annotations are left as is, otherwise
golint complains like this:

> pkg/mount/deprecated.go:45:1: comment on exported var `MergeTmpfsOptions` should be of the form `MergeTmpfsOptions ...` (golint)
> // Deprecated: use github.com/moby/sys/mount instead.
> ^

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-03-20 09:46:25 -07:00
Kir Kolyshkin 59c0495409 pkg/mount: make it shallow
Make pkg/mount a shallow package, relying on
github.com/moby/sys/mount and github.com/moby/sys/mountinfo

The plan is to
 - switch the rest of this repo to use moby/sys directly
 - add deprecation notice to pkg/mount
 - (eventually) remove pkg/mount

The nolint:golint annotation is added to suppress warnings like
"exported XXX should have comment or be unexported".

The ForceMount function is deprecated (and is identical to Mount),
so let's not use it (but still provide an alias for those who do).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-03-20 09:46:25 -07:00