lang: core: util: Add hostname mapper function

This adds a new util package with some useful functionality which could
be implemented as pure mcl, but instead we add it here as a good place
to help with code reuse.
This commit is contained in:
James Shubin
2024-11-05 14:06:52 -05:00
parent 3fb492f6aa
commit be7a5399e3
4 changed files with 158 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
import "util"
$m = {
"00:11:22:33:44:55" => "hostname1",
"00:11:22:33:44:56" => "hostname1",
"aa:bb:cc:dd:ee:fe" => "hostname2",
"aa:bb:cc:dd:ee:ff" => "hostname2",
}
print "mapper" {
msg => util.hostname_mapper($m),
}