-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add json(), unjson(), eval().
println(json(info))
works despite int…
… keys in the all_ids stack. Revamped errors vs normal output, don't output "nil" if not interactive. Updated extensions API. (#114) * Add json() though... ugly but print(json(info)) works. Changed that errors are not put to stdout and nil result aren't printed except in interactive mode * drop no_json * shrink hashable (remove return and quote from there), augment Equals, notably Error,Function,Extension can be checked) * added optional indent bool to json() and added eval() and unjson() being... more or less eval() for now * Fixes #115 (but not pretty) * update go install instructions * only one type (extended/long) of callback, with an adapter for short ones * pass the eval state as opaque any callback first arg * implement custom JSON serialization for all object types. switch back to no_json, stop checking at runtime that tags are right * collapse section of go.mod * added tests for json of map with numeric keys, and for eval in right context * nested array json test * exclude pprof through no_pprof build tag, saves ~150k in binary size * go 1.22.6 is out * better with the new files
- Loading branch information
Showing
16 changed files
with
382 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,20 @@ | ||
module grol.io/grol | ||
|
||
go 1.22.5 | ||
go 1.22.6 | ||
|
||
require ( | ||
fortio.org/cli v1.8.0 | ||
fortio.org/log v1.16.0 | ||
fortio.org/sets v1.2.0 | ||
fortio.org/testscript v0.3.1 // only for tests | ||
fortio.org/version v1.0.4 | ||
github.com/google/go-cmp v0.6.0 // only for tests | ||
) | ||
|
||
// replace fortio.org/log => ../../fortio.org/log | ||
|
||
require fortio.org/sets v1.1.1 | ||
|
||
require ( | ||
fortio.org/struct2env v0.4.1 // indirect | ||
github.com/kortschak/goroutine v1.1.2 // indirect | ||
golang.org/x/crypto/x509roots/fallback v0.0.0-20240626151235-a6a393ffd658 // indirect | ||
golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 // indirect | ||
golang.org/x/sys v0.21.0 // indirect | ||
golang.org/x/tools v0.22.0 // indirect | ||
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect | ||
golang.org/x/sys v0.22.0 // indirect | ||
golang.org/x/tools v0.23.0 // indirect | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.