risor
risor copied to clipboard
Adjust print formatting
These changes make print-formatting for Risor objects generally more usable.
The idea here is to:
- print primitive types exactly the same as Go would (bool, nil, int, float, byte, error, string)
- special case for times (Risor uses RFC3339 formatting which is my preference)
- otherwise use the Risor object String() or Inspect() methods to get the equivalent string to print
The print format for items in category 1 remain unchanged from previous versions of Risor.
Categories 2 and 3 are a change. In many cases the previous formats weren't terribly usable, so I think this is a change for a better and most programs are unlikely to depend on an exact print() format.
Fixes https://github.com/risor-io/risor/issues/247