lang, test, examples: lang: Use new syntax for structlookup

Sugar makes the world go round.
This commit is contained in:
James Shubin
2023-11-04 14:52:19 -04:00
parent 233625db20
commit 6cc5adcd25
10 changed files with 23 additions and 23 deletions

View File

@@ -27,9 +27,9 @@ import "sys"
\$theload = sys.load()
\$x1 = structlookup(\$theload, "x1")
\$x5 = structlookup(\$theload, "x5")
\$x15 = structlookup(\$theload, "x15")
\$x1 = \$theload->x1
\$x5 = \$theload->x5
\$x15 = \$theload->x15
file "${tmpdir}/loadavg" {
content => fmt.printf("load average: %f, %f, %f\n", \$x1, \$x5, \$x15),