Migrate three pure-function modules from Elixir to Gleam: - polling_offset: deterministic hash-based polling offset (pure Gleam, no FFI) - changelog_parser: text parsing logic in Gleam, thin Elixir wrapper for File I/O - user_agent_parser: regex-based UA parsing in Gleam with Erlang FFI for atom-keyed map conversion Add gleam_regexp dependency for regex support in Gleam modules. Update all call sites and tests to use Gleam module atoms. Reviewed-on: graham/towerops-web#103
6 lines
271 B
Erlang
6 lines
271 B
Erlang
-module(snmpkit_formatting_ffi).
|
|
-export([format_float/2]).
|
|
|
|
%% Format a float to a string with the specified number of decimal places.
|
|
format_float(Value, Decimals) when is_float(Value), is_integer(Decimals) ->
|
|
erlang:float_to_binary(Value, [{decimals, Decimals}]).
|