11
12func TransferStringToJson(stringData string) (interface{}, error) {
13 var interfaces interface{}
14 var bytes []byte 15 bytes = []byte(stringData)
16 err := json.Unmarshal(bytes, &interfaces)
17 if nil != err {
Variable declaration and assignment can be merged, simplifying the code.
var x int
x = 1
var x int = 1
or
x := 1