about summary refs log tree commit diff
path: root/tools/ipconverter (follow)
Commit message (Collapse)AuthorAgeFilesLines
* fix(tools): install dependencies correctlyFranck Cuny2022-10-291-1/+2
| | | | | | | For the python tools, we need the python runtime to be available. For this we need to specify the dependencies in `propagatedBuildInputs`. The same is true for flamegraph and perf.
* ref(tools/python): make mypy happyFranck Cuny2022-10-171-5/+8
|
* ref(tools/ipconverter): rewrite the tool in pythonFranck Cuny2022-10-045-122/+55
| | | | | | | No need to do this with Go, a python script is fine. We also don't need to set shell aliases for this: when we install the tool, we can create symbolic links to `ip2int` and `int2ip`.
* fix(fmt): apply gofmt on some filesFranck Cuny2022-08-151-2/+1
| | | | | | | Change-Id: I9d1ff1b7de5cb89ffcf40bc91e794f7ff420c1e8 Reviewed-on: https://cl.fcuny.net/c/world/+/717 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* ref(tools): simplify the import of toolsFranck Cuny2022-08-061-2/+2
| | | | | | | | | | | In the `mkSystem` function, instead of defining each tools, let's import all of them at once. This works both with installing a tool from a module or running them from the CLI. Change-Id: Ia44ff9a45b54a1ecea6f6b02b4cad2956799f627 Reviewed-on: https://cl.fcuny.net/c/world/+/682 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(tools/ipconverter): add missing new lines to print statementsFranck Cuny2022-06-201-4/+4
| | | | | | | Change-Id: I2dffe70dae5ef287c49d3504f9db438661adc16b Reviewed-on: https://cl.fcuny.net/c/world/+/465 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(tools/ipconverter): fail if number of arguments is insufficientFranck Cuny2022-06-201-0/+5
| | | | | | | Change-Id: Ifa382713e3f7cf2360b58d6c05a8a200258921f2 Reviewed-on: https://cl.fcuny.net/c/world/+/464 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(ipconverter): add a tool to convert IPv4 to int and vice-versaFranck Cuny2022-06-184-0/+120
It's sometimes useful to store IPv4 addresses as an integer. This tool helps with the conversion, and also does the reverse conversion. ``` % go run . int2ip 3232235521 3232235521 192.168.0.1 % go run . ip2int 192.168.0.1 192.168.0.1 3232235521 ``` Change-Id: Ic1e44057bca3539b4c183d387c635f69f5bf3f36 Reviewed-on: https://cl.fcuny.net/c/world/+/441 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>