Age | Commit message (Collapse) | Author |
|
This reverts commit 409a974095a3f5b637e091494b5d14b451c5de78.
After thinking about this, use case, and function naming, I think it's
probably best for now to keep things simple and let `fact()` be
single-purpose for looking up facts with no potentially confusing
extensions. The only use case where the name makes sense is where it's
being used on the `$facts` hash, and I think we'd rather in that
circumstance promote the raw use of `fact()`.
|
|
Because sometimes people want to use an alternative data set, but treat
it like it's a set of facts.
|
|
The fact() function allows dot-notation reference to facts. It is an
alternative to using $facts directly with array-indexing. Array-indexing
is often onerous to use since it doesn't align with how structured facts
are accessed elsewhere in the ecosystem and if any element in a
multi-step path doesn't exist, array indexing can cause a compilation
failure.
Example usage:
fact('os.family')
|