Skip to content

Commit 85dc0fb

Browse files
committed
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 <[email protected]>
1 parent 99beb2c commit 85dc0fb

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

pkg/mount/deprecated.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,18 @@ const (
4646

4747
// Deprecated: use github.com/moby/sys/mount instead.
4848
//nolint:golint
49-
var MergeTmpfsOptions = sysmount.MergeTmpfsOptions
49+
var (
50+
MergeTmpfsOptions = sysmount.MergeTmpfsOptions
51+
)
5052

51-
// Deprecated: use github.com/moby/sys/mountinfo instead.
5253
//nolint:golint
5354
type (
55+
// FilterFunc is a type.
56+
// Deprecated: use github.com/moby/sys/mountinfo instead.
5457
FilterFunc = mountinfo.FilterFunc
55-
Info = mountinfo.Info
58+
// Info is a type.
59+
// Deprecated: use github.com/moby/sys/mountinfo instead.
60+
Info = mountinfo.Info // Info is deprecated
5661
)
5762

5863
// Deprecated: use github.com/moby/sys/mountinfo instead.

0 commit comments

Comments
 (0)