1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 05:19:39 +02:00

chore(code): replace interface{} with any EE-6513 (#11986)

This commit is contained in:
andres-portainer 2024-06-28 14:59:28 -03:00 committed by GitHub
parent 9c4935286f
commit f0d43f941f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
66 changed files with 231 additions and 231 deletions

View file

@ -227,10 +227,10 @@ func (manager *SwarmStackManager) updateDockerCLIConfiguration(configPath string
}
if config["HttpHeaders"] == nil {
config["HttpHeaders"] = make(map[string]interface{})
config["HttpHeaders"] = make(map[string]any)
}
headersObject := config["HttpHeaders"].(map[string]interface{})
headersObject := config["HttpHeaders"].(map[string]any)
headersObject["X-PortainerAgent-ManagerOperation"] = "1"
headersObject["X-PortainerAgent-Signature"] = signature
headersObject["X-PortainerAgent-PublicKey"] = manager.signatureService.EncodedPublicKey()
@ -238,12 +238,12 @@ func (manager *SwarmStackManager) updateDockerCLIConfiguration(configPath string
return manager.fileService.WriteJSONToFile(configFilePath, config)
}
func (manager *SwarmStackManager) retrieveConfigurationFromDisk(path string) (map[string]interface{}, error) {
var config map[string]interface{}
func (manager *SwarmStackManager) retrieveConfigurationFromDisk(path string) (map[string]any, error) {
var config map[string]any
raw, err := manager.fileService.GetFileContent(path, "")
if err != nil {
return make(map[string]interface{}), nil
return make(map[string]any), nil
}
err = json.Unmarshal(raw, &config)