This is a giant refactor to move functions into a hierarchial module layout. While this isn't entirely implemented yet, it should work correctly once all the import bits have landed. What's broken at the moment is the template function, which currently doesn't understand the period separator.
16 lines
252 B
Plaintext
16 lines
252 B
Plaintext
import "fmt"
|
|
|
|
$st = struct{f1 => 42, f2 => true, f3 => 3.14,}
|
|
|
|
$f1 = structlookup($st, "f1")
|
|
|
|
print "print1" {
|
|
msg => fmt.printf("f1 field is: %d", $f1),
|
|
}
|
|
|
|
$f2 = structlookup($st, "f2")
|
|
|
|
print "print2" {
|
|
msg => fmt.printf("f2 field is: %t", $f2),
|
|
}
|