{"push_id":2855528950,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"7f58be417e66e8f297068b54c55851ea6e5ef3bc","before":"c30a6d22c4f208db6ffcddb6abebc3fcee935514","commits":[{"sha":"7f58be417e66e8f297068b54c55851ea6e5ef3bc","author":{"name":"Jo Giroux","email":"afe7edf9a458c9a62f82aaf6f662e8119d6d5e0c@users.noreply.github.com"},"message":"Fix razor syntax for assignation (#26)\n\n* Error detection improvments\r\n\r\n- Improve the error detection to detect uninitialized variables <no value>T\r\n- Try to detect all errors in a template instead of stopping on the first one encountered\r\n- Rename Keys and Values to GetKeys and GetValues on IDictionary object to avoid conflict with potentials key name\r\n- Fix a bug causing generated files to have the wrong file mode (0755 instead of 0644)\r\n- Fix a bug causing some strings to be modified by the razor parser\r\n- Fix a bug with the extract function causing results to not be in the same order as the keys\r\n- Use json strings and json dict by default instead of the generic go lists and maps\r\n- Add support fot the new go template feature allowing overwrite of variables using the syntax {{ $var = \"value\" }}\r\n- Stop evaluation on @(var).x, now it wiil result in \"value.x\" instead of trying to access field x of var\r\n- Add an option to disable errors on <no value> --accept-no-value or shorter --nv\r\n- Fix a bug to detect divide by 0\r\n- Add functions to detect nil object (isNil, isNull, isZero, isEmpty)\r\n- Add a function to validate assertion  within template, assert\r\n- Add a function to raise errors within template, raise\r\n- Fix a problem with ellipsis evaluation @func(arg1, arg2...)\r\nOverwrite Sprig list functions to always get serializable list objects\r\n- Improve the documentation\r\n\r\n* Fix documentaion\r\n\r\n* Add isSet function\r\n\r\n* Fine tuning\r\n\r\nFix problem when using functions handling <no value> within a if, range or with\r\nremove the true and false functions (already exists)\r\nNo longer add a - on if, range, with etc.\r\n\r\n* Fix evaluation problem\r\n\r\nThe first solution was not working properly when no value objects were encountered within a range loop.\r\n\r\n- Add environment variable to enable or disable --no-value switch\r\n- Fix bugs in math library when dealing with nul values\r\n- Ensure that each evaluated template gets its own context (i.e. variables cannot be set in one template and read in another one because that is causing undesirable side effects)\r\n\r\n* Add error management over bad substituters or delimiters\r\n\r\n* Make type to describe added functions public\r\n\r\nThis is necessary if we want to let user of the library to use the power of detailed functions with integrated help.\r\n\r\n* When creating a new context, options must be duplicated\r\n\r\n* As for @(var), @{var} should not evaluate characters after the closing brace\r\n\r\n* Force @{var} to evaluate to @(var); to avoid interpretation problem.\r\n\r\n* Add OS function group\r\n\r\nMove diff, glob, pwd and save from other utilities to OS group\r\nMove assert and raise form other utilities to Runtime group\r\nAdd diff, exists, glob, group, home, isDir, isExecutable, isFile, isReadable, isWriteable, lastMod, lookPath, mode, pwd, save, size, stat, user and username functions to OS function group\r\n\r\n* Update documentation\r\n\r\n* Function username and home should not return error when not defined\r\n\r\nOtherwise, it is impossible for gotemplate to determine if those functions are enabled or not. If they return an empty string, that signify that the os function is not working (probably because there is no environment variable identifying the current user).\r\n\r\n* No longer accept the syntax $var := value or $var = value\r\n\r\nIn razor mode, only statement starting with the razor expression @ are working. This avoid the razor translator to inadvertently modify legit code.\r\nAdd global function to test if source code contains razor or go template code using the default delimiters (this avoid instantiating a Template object in order to test if a string contains go template code)\r\n\r\n* - Add support for GOTEMPLATE_NOVALUE environment variable when used as a library\r\n- Add initialization of substitutes regex from GOTEMPLATE_SUBSTITUTES environment variable.\r\n- Ignore empty path when looking for extensions\r\n- Rename FindWord and FindContext to GetWordAtPosition and GetContextAtPosition as suggested in code review\r\n\r\n* Add tests for multiple errors detection\r\n\r\nFix a bug when the the error is reported a line -1","distinct":true,"url":"https://api.github.com/repos/coveo/gotemplate/commits/7f58be417e66e8f297068b54c55851ea6e5ef3bc"}]}
{"actor":{"display_login":"jocgir"}}