[x] Tests for the changes have been added (for bug fixes / features).
[x] Docs have been added/updated (for bug fixes / features).
Issue:
There is a transient failure in the func map since it parses for "!include_dir" and "!include" -- Maps are unordered by nature in Go which means that when "!include" gets parsed first on a "!include_dir" directive it fails
Solution:
Create a struct for the FuncMap which will order the range inherently
Testing:
Script
#!/usr/bin/env bash
good_count=0
bad_count=0
for i in {1..100}; do
if go test > /dev/null 2>&1; then
good_count=$((good_count+1))
else
bad_count=$((bad_count+1))
fi
done
echo "good_count: $good_count"
echo "bad_count: $bad_count"
Prerequisites
Issue:
There is a transient failure in the func map since it parses for "!include_dir" and "!include" -- Maps are unordered by nature in Go which means that when "!include" gets parsed first on a "!include_dir" directive it fails
Solution:
Create a struct for the FuncMap which will order the
range
inherentlyTesting:
Script
Before change:
After Change:
Original transient failure in the test: