diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-15 17:53:33 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-15 17:53:33 -0400 |
| commit | ed4fc11119459acfb1684607564dfe0820f5e05f (patch) | |
| tree | c53e70ea0a20f2c30c994775a5e2d0044f4191ec /examples/ini/ini.tm | |
| parent | 8a1ace4d651a2e1959f194bff02a21b4f704ac07 (diff) | |
Support printing INI file without a key
Diffstat (limited to 'examples/ini/ini.tm')
| -rw-r--r-- | examples/ini/ini.tm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/ini/ini.tm b/examples/ini/ini.tm index c0d490cb..b0fd1caf 100644 --- a/examples/ini/ini.tm +++ b/examples/ini/ini.tm @@ -29,8 +29,8 @@ func parse_ini(path:Path)->{Text:{Text:Text}}: return {k:v[] for k,v in sections} -func main(path:Path, key:Text): - keys := key:split($Pattern"/") +func main(path:Path, key:Text?): + keys := key:or_else(""):split($Pattern"/") if keys.length > 2: exit(" Too many arguments! |
