Updating golangci-lint to 2.7.1 (#36678)

<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #32999

And fixing newly flagged lint issues.
This commit is contained in:
Victor Lyuboslavsky
2025-12-04 10:45:50 -06:00
committed by GitHub
parent 083e51f63b
commit ccd66921e7
7 changed files with 15 additions and 14 deletions
+2
View File
@@ -866,6 +866,7 @@ const (
MDMAssetABMCert MDMAssetName = "abm_cert"
// MDMAssetABMTokenDeprecated is an encrypted JSON file that contains a token
// that can be used for the authentication process with the ABM API.
//
// Deprecated: ABM tokens are now stored in the abm_tokens table, they are
// not in mdm_config_assets anymore.
MDMAssetABMTokenDeprecated MDMAssetName = "abm_token"
@@ -874,6 +875,7 @@ const (
MDMAssetSCEPChallenge MDMAssetName = "scep_challenge"
// MDMAssetVPPTokenDeprecated is the name of the token used by MDM to
// authenticate to Apple's VPP service.
//
// Deprecated: VPP tokens are now stored in the vpp_tokens table, they are
// not in mdm_config_assets anymore.
MDMAssetVPPTokenDeprecated MDMAssetName = "vpp_token"
+2 -1
View File
@@ -1612,7 +1612,8 @@ type listHostDeviceMappingResponse struct {
func (r listHostDeviceMappingResponse) Error() error { return r.Err }
// listHostDeviceMappingEndpoint
// listHostDeviceMappingEndpoint returns the device mappings for a host.
//
// Deprecated: Emails are now included in host details endpoint /api/_version_/fleet/hosts/{id}
func listHostDeviceMappingEndpoint(ctx context.Context, request interface{}, svc fleet.Service) (fleet.Errorer, error) {
req := request.(*listHostDeviceMappingRequest)
+5 -5
View File
@@ -2102,7 +2102,7 @@ func NewTypedSyncMLCmd(dataType mdm_types.SyncMLDataType, cmdVerb string, cmdTar
return nil, errInvalidParameters
case mdm_types.SFText:
if len(cmdData) > 0 && len(cmdTarget) > 0 && len(cmdData) > 0 {
if len(cmdData) > 0 && len(cmdTarget) > 0 {
rawCmd := newSyncMLCmdText(cmdVerb, cmdTarget, cmdData)
return rawCmd, nil
}
@@ -2110,7 +2110,7 @@ func NewTypedSyncMLCmd(dataType mdm_types.SyncMLDataType, cmdVerb string, cmdTar
return nil, errInvalidParameters
case mdm_types.SFXml:
if len(cmdData) > 0 && len(cmdTarget) > 0 && len(cmdData) > 0 {
if len(cmdData) > 0 && len(cmdTarget) > 0 {
rawCmd := newSyncMLCmdXml(cmdVerb, cmdTarget, cmdData)
return rawCmd, nil
}
@@ -2118,7 +2118,7 @@ func NewTypedSyncMLCmd(dataType mdm_types.SyncMLDataType, cmdVerb string, cmdTar
return nil, errInvalidParameters
case mdm_types.SFInteger:
if len(cmdData) > 0 && len(cmdTarget) > 0 && len(cmdData) > 0 {
if len(cmdData) > 0 && len(cmdTarget) > 0 {
rawCmd := newSyncMLCmdInt(cmdVerb, cmdTarget, cmdData)
return rawCmd, nil
}
@@ -2126,7 +2126,7 @@ func NewTypedSyncMLCmd(dataType mdm_types.SyncMLDataType, cmdVerb string, cmdTar
return nil, errInvalidParameters
case mdm_types.SFBase64:
if len(cmdData) > 0 && len(cmdTarget) > 0 && len(cmdData) > 0 {
if len(cmdData) > 0 && len(cmdTarget) > 0 {
rawCmd := newSyncMLCmdBase64(cmdVerb, cmdTarget, cmdData)
return rawCmd, nil
}
@@ -2134,7 +2134,7 @@ func NewTypedSyncMLCmd(dataType mdm_types.SyncMLDataType, cmdVerb string, cmdTar
return nil, errInvalidParameters
case mdm_types.SFBoolean:
if len(cmdData) > 0 && len(cmdTarget) > 0 && len(cmdData) > 0 {
if len(cmdData) > 0 && len(cmdTarget) > 0 {
rawCmd := newSyncMLCmdBool(cmdVerb, cmdTarget, cmdData)
return rawCmd, nil
}