summaryrefslogtreecommitdiff
path: root/exports/exports.go
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-07-12 09:23:08 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-07-12 09:23:08 +0200
commitfc345f1623d83d3c2e9acb8b3c9139656b2797d1 (patch)
treef519604015e9d90b6c032025a2307aa7fd758aad /exports/exports.go
parent71d24f33639a7ad7a76061115f13e781424c845a (diff)
Exports + Python: Fix config JSON parsing
Diffstat (limited to 'exports/exports.go')
-rw-r--r--exports/exports.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/exports/exports.go b/exports/exports.go
index 468c5a4..aa2b40e 100644
--- a/exports/exports.go
+++ b/exports/exports.go
@@ -109,18 +109,19 @@ func CancelOAuth(name *C.char) *C.char {
}
type configJSON struct {
- config string `json:"config"`
- configType string `json:"config_type"`
+ Config string `json:"config"`
+ ConfigType string `json:"config_type"`
}
func getConfigJSON(config string, configType string) *C.char {
- json, jsonErr := json.Marshal(&configJSON{config, configType})
+ object := &configJSON{Config: config, ConfigType: configType}
+ jsonBytes, jsonErr := json.Marshal(object)
if jsonErr != nil {
panic(jsonErr)
}
- return C.CString(string(json))
+ return C.CString(string(jsonBytes))
}
//export GetConfigSecureInternet