Explorar o código

pkg/mount: make standalone golint happy

We do our CI via golangci-lint, which understands nolint: annotations.

A standalone linter tool, golint, does not, and it insists on
documenting these:

> pkg/mount/deprecated.go:47:1: comment on exported var MergeTmpfsOptions should be of the form "MergeTmpfsOptions ..."
> pkg/mount/deprecated.go:51:1: comment on exported type FilterFunc should be of the form "FilterFunc ..." (with optional leading article)
> pkg/mount/deprecated.go:51:1: comment on exported type Info should be of the form "Info ..." (with optional leading article)

For `MergeTmpfsOptions`, the workaround is to put it inside a
`var ( ... )` block.

For the other two warnings, we have to provide the "actual"
documentation (or something that looks like it).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Kir Kolyshkin %!s(int64=5) %!d(string=hai) anos
pai
achega
85dc0fb7d5
Modificáronse 1 ficheiros con 8 adicións e 3 borrados
  1. 8 3
      pkg/mount/deprecated.go

+ 8 - 3
pkg/mount/deprecated.go

@@ -46,13 +46,18 @@ const (
 
 
 // Deprecated: use github.com/moby/sys/mount instead.
 // Deprecated: use github.com/moby/sys/mount instead.
 //nolint:golint
 //nolint:golint
-var MergeTmpfsOptions = sysmount.MergeTmpfsOptions
+var (
+	MergeTmpfsOptions = sysmount.MergeTmpfsOptions
+)
 
 
-// Deprecated: use github.com/moby/sys/mountinfo instead.
 //nolint:golint
 //nolint:golint
 type (
 type (
+	// FilterFunc is a type.
+	// Deprecated: use github.com/moby/sys/mountinfo instead.
 	FilterFunc = mountinfo.FilterFunc
 	FilterFunc = mountinfo.FilterFunc
-	Info       = mountinfo.Info
+	// Info is a type.
+	// Deprecated: use github.com/moby/sys/mountinfo instead.
+	Info = mountinfo.Info // Info is deprecated
 )
 )
 
 
 // Deprecated: use github.com/moby/sys/mountinfo instead.
 // Deprecated: use github.com/moby/sys/mountinfo instead.