# Pastebin Z29lszu7 Running staticcheck /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-seccomp/_cgo_gotypes.go:12:6: func _Cgo_ptr is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-seccomp/_cgo_gotypes.go:15:5: var _Cgo_always_false is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-seccomp/_cgo_gotypes.go:17:6: func _Cgo_use is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-seccomp/_cgo_gotypes.go:24:6: type _Ctype_kernel_seccomp_data is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-seccomp/_cgo_gotypes.go:26:6: type _Ctype_struct_seccomp_data is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-seccomp/_cgo_gotypes.go:37:6: type _Ctype_void is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-seccomp/_cgo_gotypes.go:40:6: func _cgo_runtime_cgocall is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-seccomp/_cgo_gotypes.go:43:6: func _cgo_runtime_cgocallback is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-seccomp/_cgo_gotypes.go:46:6: func _cgoCheckPointer is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-seccomp/_cgo_gotypes.go:49:6: func _cgoCheckResult is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-seccomp/_cgo_gotypes.go:187:5: var __cgofn__cgo_c925c168cf22_Cfunc_htot32 is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-seccomp/_cgo_gotypes.go:188:5: var _cgo_c925c168cf22_Cfunc_htot32 is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-seccomp/_cgo_gotypes.go:191:6: func _Cfunc_htot32 is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-seccomp/_cgo_gotypes.go:201:5: var __cgofn__cgo_c925c168cf22_Cfunc_htot64 is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-seccomp/_cgo_gotypes.go:202:5: var _cgo_c925c168cf22_Cfunc_htot64 is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-seccomp/_cgo_gotypes.go:205:6: func _Cfunc_htot64 is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-update-ns/_cgo_gotypes.go:12:6: func _Cgo_ptr is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-update-ns/_cgo_gotypes.go:15:5: var _Cgo_always_false is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-update-ns/_cgo_gotypes.go:17:6: func _Cgo_use is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-update-ns/_cgo_gotypes.go:32:6: type _Ctype_void is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-update-ns/_cgo_gotypes.go:35:6: func _cgo_runtime_cgocall is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-update-ns/_cgo_gotypes.go:38:6: func _cgo_runtime_cgocallback is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-update-ns/_cgo_gotypes.go:41:6: func _cgoCheckPointer is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-update-ns/_cgo_gotypes.go:44:6: func _cgoCheckResult is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-update-ns/_cgo_gotypes.go:55:6: func _Cfunc_CString is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-update-ns/_cgo_gotypes.go:71:5: var __cgofn__cgo_412957b1c196_Cfunc_free is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-update-ns/_cgo_gotypes.go:72:5: var _cgo_412957b1c196_Cfunc_free is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-update-ns/_cgo_gotypes.go:75:6: func _Cfunc_free is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-update-ns/_cgo_gotypes.go:84:5: var __cgofn__cgo_412957b1c196_Cfunc_process_arguments is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-update-ns/_cgo_gotypes.go:85:5: var _cgo_412957b1c196_Cfunc_process_arguments is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-update-ns/_cgo_gotypes.go:88:6: func _Cfunc_process_arguments is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-update-ns/_cgo_gotypes.go:102:5: var __cgofn__cgo_412957b1c196_Cfunc_validate_instance_name is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-update-ns/_cgo_gotypes.go:103:5: var _cgo_412957b1c196_Cfunc_validate_instance_name is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-update-ns/_cgo_gotypes.go:106:6: func _Cfunc_validate_instance_name is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-update-ns/_cgo_gotypes.go:116:5: var __cgofn__cgo_412957b1c196_Cfunc__Cmalloc is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-update-ns/_cgo_gotypes.go:117:5: var _cgo_412957b1c196_Cfunc__Cmalloc is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-update-ns/_cgo_gotypes.go:120:6: func runtime_throw is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_cmd_snap-update-ns/_cgo_gotypes.go:123:6: func _cgo_cmalloc is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_osutil/_cgo_gotypes.go:12:6: func _Cgo_ptr is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_osutil/_cgo_gotypes.go:33:2: field gr_name is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_osutil/_cgo_gotypes.go:34:2: field gr_passwd is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_osutil/_cgo_gotypes.go:37:2: field gr_mem is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_osutil/_cgo_gotypes.go:50:6: func _cgo_runtime_cgocallback is unused (U1000) /tmp/gopackages150673534/go-build/github.com_snapcore_snapd_osutil/_cgo_gotypes.go:56:6: func _cgoCheckResult is unused (U1000) asserts/fetcher.go:29:2: const fetchNotSeen is unused (U1000) asserts/headers.go:277:6: should use strings.ContainsRune(x, '\n') instead (S1003) asserts/ifacedecls.go:435:19: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007) asserts/membackstore.go:118:2: redundant return statement (S1023) cmd/snap-exec/main.go:182:3: should replace this if statement with an unconditional strings.TrimPrefix (S1017) cmd/snap-failure/main.go:34:2: var Stdout is unused (U1000) cmd/snap-seccomp/main.go:455:6: type SeccompData is unused (U1000) cmd/snap-update-ns/bootstrap.go:78:6: func clearBootstrapError is unused (U1000) cmd/snap-update-ns/bootstrap.go:85:6: func makeArgv is unused (U1000) cmd/snap-update-ns/bootstrap.go:94:6: func freeArgv is unused (U1000) cmd/snap-update-ns/bootstrap.go:105:6: func validateInstanceName is unused (U1000) cmd/snap-update-ns/bootstrap.go:117:6: func processArguments is unused (U1000) cmd/snap-update-ns/utils.go:44:2: const Ext4Magic is unused (U1000) cmd/snap-update-ns/utils.go:66:2: var sysFchdir is unused (U1000) cmd/snap/cmd_advise.go:114:3: field Command is unused (U1000) cmd/snap/cmd_advise.go:115:3: field SearchTerms is unused (U1000) cmd/snap/cmd_connectivity_check.go:47:3: field Connectivity is unused (U1000) cmd/snap/cmd_snap_op.go:245:21: error strings should not be capitalized (ST1005) cmd/snap/cmd_snapshot.go:32:6: func fmtSize is unused (U1000) cmd/snap/interfaces_common.go:30:6: type AttributePair is unused (U1000) cmd/snap/last.go:51:5: error var noChangeFoundOK should have name of the form errFoo (ST1012) cmd/snap/wait.go:50:5: error var noWait should have name of the form errFoo (ST1012) daemon/api.go:285:9: the argument is already a string, there's no need to use fmt.Sprintf (S1025) daemon/api.go:446:2: default case should be first or last in switch statement (ST1015) daemon/api.go:2199:6: func makeHttpClient is unused (U1000) daemon/daemon.go:293:8: should use time.Since instead of time.Now().Sub (S1012) errtracker/errtracker.go:76:2: field reportedBucket is unused (U1000) interfaces/apparmor/spec.go:253:6: func chopTree is unused (U1000) interfaces/ifacetest/backendtest.go:23:2: should not use dot imports (ST1001) interfaces/policy/policy.go:151:32: func (*ConnectCandidate).plugSnapType is unused (U1000) interfaces/policy/policy.go:155:32: func (*ConnectCandidate).slotSnapType is unused (U1000) interfaces/seccomp/spec.go:55:3: should replace loop with vCopy = append(vCopy, v...) (S1011) interfaces/sorting.go:45:6: type bySlotRef is unused (U1000) interfaces/sorting.go:56:6: type byPlugRef is unused (U1000) interfaces/sorting.go:95:6: type byBackendName is unused (U1000) interfaces/sorting.go:147:6: type byPlugInfo is unused (U1000) interfaces/sorting.go:161:6: type bySlotInfo is unused (U1000) interfaces/udev/backend.go:154:2: should replace loop with content = append(content, spec.Snippets()...) (S1011) osutil/squashfs/fstype.go:47:2: should use 'return ' instead of 'if { return }; return ' (S1008) osutil/strace/strace.go:90:75: the argument is already a string, there's no need to use fmt.Sprintf (S1025) osutil/strace/timing.go:136:5: var timeRE is unused (U1000) osutil/udev/crawler/device.go:31:24: error strings should not be capitalized (ST1005) osutil/udev/crawler/device.go:98:31: should use make(map[string]string) instead (S1019) osutil/udev/netlink/conn.go:108:24: error strings should not be capitalized (ST1005) osutil/udev/netlink/conn.go:122:26: error strings should not be capitalized (ST1005) osutil/udev/netlink/matcher.go:62:40: should use make(map[string]*regexp.Regexp) instead (S1019) osutil/udev/netlink/uevent.go:63:27: error strings should not be capitalized (ST1005) osutil/udev/netlink/uevent.go:67:27: error strings should not be capitalized (ST1005) osutil/udev/netlink/uevent.go:71:27: error strings should not be capitalized (ST1005) osutil/udev/netlink/uevent.go:83:28: error strings should not be capitalized (ST1005) osutil/udev/netlink/uevent.go:113:37: should use make(map[string]string) instead (S1019) osutil/udev/netlink/uevent.go:142:22: should use bytes.Equal(raw[:8], []byte("libudev\x00")) instead (S1004) osutil/udev/netlink/uevent.go:148:19: error strings should not be capitalized (ST1005) osutil/udev/netlink/uevent.go:154:19: error strings should not be capitalized (ST1005) osutil/udev/netlink/uevent.go:166:35: should use make(map[string]string) instead (S1019) osutil/udev/netlink/uevent.go:172:20: error strings should not be capitalized (ST1005) osutil/winsize.go:31:2: field xpixel is unused (U1000) overlord/hookstate/ctlcmd/ctlcmd.go:54:23: func (*baseCommand).errorf is unused (U1000) overlord/ifacestate/handlers.go:1073:9: const auto is unused (U1000) overlord/ifacestate/helpers.go:847:6: func setHotplugAttrs is unused (U1000) overlord/ifacestate/helpers.go:862:6: func allocHotplugSeq is unused (U1000) overlord/ifacestate/helpers.go:886:6: func setHotplugChangeAttrs is unused (U1000) overlord/ifacestate/helpers.go:893:6: func addHotplugSeqWaitTask is unused (U1000) overlord/ifacestate/helpers.go:930:6: func findConnsForHotplugKey is unused (U1000) overlord/ifacestate/hotplug.go:37:5: var attrGroups is unused (U1000) overlord/ifacestate/hotplug.go:53:5: var deviceKeyVersion is unused (U1000) overlord/ifacestate/hotplug.go:63:6: func defaultDeviceKey is unused (U1000) overlord/ifacestate/hotplug.go:101:6: func ensureUniqueName is unused (U1000) overlord/ifacestate/hotplug.go:123:7: const maxGenerateSlotNameLen is unused (U1000) overlord/ifacestate/hotplug.go:131:6: func makeSlotName is unused (U1000) overlord/ifacestate/hotplug.go:157:5: var nameAttrs is unused (U1000) overlord/ifacestate/hotplug.go:163:6: func suggestedSlotName is unused (U1000) overlord/ifacestate/hotplug.go:182:6: func updateDevice is unused (U1000) overlord/ifacestate/hotplug.go:199:6: func removeDevice is unused (U1000) overlord/ifacestate/ifacestate.go:117:44: should omit comparison to bool constant, can be simplified to !conn.Undesired (S1002) overlord/ifacestate/ifacestate.go:117:71: should omit comparison to bool constant, can be simplified to !conn.HotplugGone (S1002) overlord/patch/patch1.go:66:2: const patch1DevMode is unused (U1000) overlord/patch/patch1.go:68:2: const patch1TryMode is unused (U1000) overlord/snapshotstate/backend/backend.go:55:2: error var Stop should have name of the form ErrFoo (ST1012) overlord/snapshotstate/backend/reader.go:273:25: error strings should not be capitalized (ST1005) overlord/snapshotstate/backend/reader.go:273:25: error strings should not end with punctuation or a newline (ST1005) overlord/snapstate/cookies.go:91:20: error strings should not be capitalized (ST1005) overlord/snapstate/cookies.go:157:24: error strings should not be capitalized (ST1005) overlord/snapstate/cookies.go:165:20: error strings should not be capitalized (ST1005) overlord/snapstate/snapmgr.go:57:2: field lastUbuntuCoreTransitionAttempt is unused (U1000) partition/bootloader.go:36:2: const bootmodeVar is unused (U1000) partition/bootloader.go:39:2: const modeTry is unused (U1000) partition/ubootenv/env.go:287:21: error strings should not be capitalized (ST1005) polkit/authority.go:36:29: error strings should not be capitalized (ST1005) polkit/authority.go:37:29: error strings should not be capitalized (ST1005) release/apparmor.go:103:2: should merge variable declaration with assignment on next line (S1021) spdx/licenses.go:23:5: var osi is unused (U1000) spdx/parser.go:29:2: const opUNSET is unused (U1000) spdx/parser.go:77:18: func (*parser).advance is unused (U1000) store/cache.go:128:25: func (*CacheManager).count is unused (U1000) store/store.go:625:2: const deviceAuthPreferred is unused (U1000) store/store.go:1476:21: error strings should not be capitalized (ST1005) store/store.go:1482:21: error strings should not be capitalized (ST1005) store/store.go:1502:21: error strings should not end with punctuation or a newline (ST1005) store/store.go:1513:3: should merge variable declaration with assignment on next line (S1021) store/store.go:1535:21: error strings should not be capitalized (ST1005) strutil/shlex/shlex.go:88:2: const unknownRuneClass is unused (U1000) strutil/shlex/shlex.go:164:25: error strings should not be capitalized (ST1005) strutil/shlex/shlex.go:392:27: error strings should not be capitalized (ST1005) tests/lib/fakestore/store/store.go:236:6: type searchPayloadJSON is unused (U1000) testutil/dbustest.go:30:2: should not use dot imports (ST1001) userd/autostart.go:145:24: error strings should not be capitalized (ST1005) userd/launcher.go:97:42: error strings should not be capitalized (ST1005) userd/userd.go:97:3: should use a simple channel send/receive instead of select with a single case (S1000) x11/xauth.go:116:20: error strings should not be capitalized (ST1005) x11/xauth.go:147:25: error strings should not be capitalized (ST1005) Crushing failure and despair.