We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
stores import csv
BOM
1 parent 04d84bd commit 8a1c308Copy full SHA for 8a1c308
cmd/storesBulkOperations.go
@@ -47,6 +47,12 @@ var (
47
}
48
)
49
50
+const bom = "\uFEFF"
51
+
52
+func stripAllBOMs(s string) string {
53
+ return strings.ReplaceAll(s, bom, "")
54
+}
55
56
// formatProperties will iterate through the properties of a json object and convert any "int" values to strings
57
// this is required because the Keyfactor API expects all properties to be strings
58
func formatProperties(json *gabs.Container, reqPropertiesForStoreType []string) *gabs.Container {
@@ -355,7 +361,7 @@ If you do not wish to include credentials in your CSV file they can be provided
355
361
Value: &storePassword,
356
362
357
363
358
- mJSON := reqJson.String()
364
+ mJSON := stripAllBOMs(reqJson.String())
359
365
conversionError := json.Unmarshal([]byte(mJSON), &createStoreReqParameters)
360
366
367
if conversionError != nil {
0 commit comments