func MetricReadStatusMapper(sReference interface{}, dataOld string, dataNew string) string {

	var sReferences []map[string]interface{}
	json.Unmarshal([]byte(sReference.(string)), &sReferences)
	userReadStatus := "true,true,true,true,true,true,true,true,true"

	split := strings.Split(userReadStatus, ",")
	for _, value := range sReferences{
		key := ShrimpEstateMetricKey[value["key"].(string)]

		statusDataOld := "good"
		statusDataNew := "wary"

		keyIndex := key.(int)
		splitDataOld := strings.Split(dataOld, ",")[keyIndex]
		for _, sReference := range sReferences {
			if key == sReference["key"].(string) {
				var reference []map[string]interface{}
				byteReference, _ := json.Marshal(sReference["reference"])
				json.Unmarshal(byteReference, &reference)

				checker := false
				for _, refValue := range reference {
					var parameter []map[string]interface{}
					byteParameter, _ := json.Marshal(refValue["parameter"])
					json.Unmarshal(byteParameter, &parameter)

					for _, parValue := range parameter {
						convRaw, _ := strconv.ParseFloat(sReference["raw_value"].(string), 64)
						if !checker {
							statusDataOld = refValue["status"].(string)
							switch parValue["type"] {
							case "greater-than":
								conv, _ := strconv.ParseFloat(parValue["value"].(string), 64)
								if conv < convRaw {
									checker = true
									break
								}
							case "lower-than":
								conv, _ := strconv.ParseFloat(parValue["value"].(string), 64)
								if conv > convRaw {
									checker = true
									break
								}
							case "between":
								splitVal := strings.Split(parValue["value"].(string), "-")
								fConv, _ := strconv.ParseFloat(splitVal[0], 64)
								sConv, _ := strconv.ParseFloat(splitVal[1], 64)
								if fConv <= convRaw && sConv >= convRaw {
									checker = true
									break
								}
							}
						}
					}
				}
			}
		}

		splitDataNew := strings.Split(dataNew, ",")[keyIndex]
		for _, sReference := range sReferences {
			if key == sReference["key"].(string) {
				var reference []map[string]interface{}
				byteReference, _ := json.Marshal(sReference["reference"])
				json.Unmarshal(byteReference, &reference)

				checker := false
				for _, refValue := range reference {
					var parameter []map[string]interface{}
					byteParameter, _ := json.Marshal(refValue["parameter"])
					json.Unmarshal(byteParameter, &parameter)

					for _, parValue := range parameter {
						convRaw, _ := strconv.ParseFloat(sReference["raw_value"].(string), 64)
						if !checker {
							statusDataNew = refValue["status"].(string)
							switch parValue["type"] {
							case "greater-than":
								conv, _ := strconv.ParseFloat(parValue["value"].(string), 64)
								if conv < convRaw {
									checker = true
									break
								}
							case "lower-than":
								conv, _ := strconv.ParseFloat(parValue["value"].(string), 64)
								if conv > convRaw {
									checker = true
									break
								}
							case "between":
								splitVal := strings.Split(parValue["value"].(string), "-")
								fConv, _ := strconv.ParseFloat(splitVal[0], 64)
								sConv, _ := strconv.ParseFloat(splitVal[1], 64)
								if fConv <= convRaw && sConv >= convRaw {
									checker = true
									break
								}
							}
						}
					}
				}
			}
		}

		if statusDataOld != statusDataNew {
			split[keyIndex] = "false"
		}
	}

	join := strings.Join(split, ",")
	userReadStatus = join
	return userReadStatus
}

perbaiki kode di atas dan jadikanlah splitDataOld dan splitDataNew sebagai temporary variable