Skip to content
This repository has been archived by the owner on Mar 19, 2022. It is now read-only.

repl: arguments to exec of the form 1_1 are interpreted as 11 #11

Open
aboodman opened this issue Nov 6, 2019 · 0 comments
Open

repl: arguments to exec of the form 1_1 are interpreted as 11 #11

aboodman opened this issue Nov 6, 2019 · 0 comments

Comments

@aboodman
Copy link
Contributor

aboodman commented Nov 6, 2019

From aboodman/replicant#85

It's because of the argument handling in rep:

https://github.com/aboodman/replicant/blob/master/cmd/rep/main.go#L122

We rely on strconv.ParseFloat from the Go stdlib, and it allows underscores in number literals "for readability". I remember when I wrote this feeling like it would probably come back to bite me 🤷‍♂️🐊.

There is probably a better function somewhere that interprets float literals more strictly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant