Skip to content

Conversation

@ilario
Copy link

@ilario ilario commented Dec 7, 2023

Running the example from the readme, I didn't get any timestamp in the timestamped example from data.json.

I identified tree small issues, one in the example config.yml, another in the example data.json and another in the util.go's "SanitizeIntValue" function:

  • the key epochtimestamp in config.yml has to be in lower case
  • the timestamp in the data.json example, in order to be found following the instructions in the config.yml contained in the example folder, has to be inside the indicated path
  • the jsonpath processing converts a timestamp like 1757568506 to a string like "1.757568506e+09". strconv.ParseInt does not consider that as a valid integer and throws an error. So I parsed the number as a float and then I cast it into an int64. I added the math.Round function just for avoiding numerical issues (e.g. 1.999999 being converted to 1), but I don't know if this could happen here, so please delete it if you consider it useless.

Please check if the Go coding is correct, as I am not experienced with it at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant