|
|
@ -6,12 +6,12 @@ import (
|
|
|
|
"os"
|
|
|
|
"os"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
func parseServiceSecrets(path string) (map[string]string, error) {
|
|
|
|
func parseServiceSecrets(path string) (map[string]interface{}, error) {
|
|
|
|
content, err := os.ReadFile(path)
|
|
|
|
content, err := os.ReadFile(path)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return nil, fmt.Errorf("Cannot read json file '%s': %w", path, err)
|
|
|
|
return nil, fmt.Errorf("Cannot read json file '%s': %w", path, err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var data map[string]string
|
|
|
|
var data map[string]interface{}
|
|
|
|
err = json.Unmarshal(content, &data)
|
|
|
|
err = json.Unmarshal(content, &data)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return nil, fmt.Errorf("Cannot parse '%s' as json file: %w", path, err)
|
|
|
|
return nil, fmt.Errorf("Cannot parse '%s' as json file: %w", path, err)
|
|
|
|