format (GoDoc) comments with Go 1.19 to prepare for go updates

Older versions of Go do not format these comments, so we can already
reformat them ahead of time to prevent gofmt linting failing once
we update to Go 1.19 or up.

Result of:

    gofmt -s -w $(find . -type f -name '*.go' | grep -v "/vendor/")

With some manual adjusting.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2022-07-13 12:29:49 +02:00
parent 3564b7d375
commit 82427d1a07
40 changed files with 136 additions and 103 deletions

View File

@ -227,7 +227,7 @@ func mergeLoggingConfig(dst, src reflect.Value) error {
return nil
}
//nolint: unparam
//nolint:unparam
func mergeUlimitsConfig(dst, src reflect.Value) error {
if src.Interface() != reflect.Zero(reflect.TypeOf(src.Interface())).Interface() {
dst.Elem().Set(src.Elem())
@ -235,7 +235,7 @@ func mergeUlimitsConfig(dst, src reflect.Value) error {
return nil
}
//nolint: unparam
//nolint:unparam
func mergeShellCommand(dst, src reflect.Value) error {
if src.Len() != 0 {
dst.Set(src)
@ -243,7 +243,7 @@ func mergeShellCommand(dst, src reflect.Value) error {
return nil
}
//nolint: unparam
//nolint:unparam
func mergeServiceNetworkConfig(dst, src reflect.Value) error {
if src.Interface() != reflect.Zero(reflect.TypeOf(src.Interface())).Interface() {
dst.Elem().FieldByName("Aliases").Set(src.Elem().FieldByName("Aliases"))

View File

@ -28,7 +28,8 @@ func isAbs(path string) (b bool) {
// volumeNameLen returns length of the leading volume name on Windows.
// It returns 0 elsewhere.
// nolint: gocyclo
//
//nolint:gocyclo
func volumeNameLen(path string) int {
if len(path) < 2 {
return 0