Tags: open2b/scriggo
Tags
cmd/scriggo: revise `README.txt` distributed with Scriggo binaries The README.txt file distributed with Scriggo binaries is a bit outdated, doesn't document some new features, and is also too cumbersome to maintain. It seems more reasonable to leave minimal documentation there and link to the website (with the documentation) and the GitHub repository, which contain updated and more extensive documentation. This commit also introduces some small styling changes to the file. Closes #1014.
cmd/scriggo: exit with status code 2 when running just `scriggo` Currently, when 'scriggo' is run without any other parameters/subcommands, it returns exit code 0. This is generally not expected, as it represents an error in which nothing has been executed. The go command, for example, returns 2 in this case. So this commit ensures that in this case, scriggo exits with exit code 2, which also appears to be the behavior of the Bash builtins. This appears to be the only case in the Scriggo command where a success status was returned when the command was called with incorrect arguments, so it has been fixed separately in this commit; for all other cases, see issue #1012.
scriggo: require Go 1.23 as the minimum supported version With the release of Go 1.24, this change sets Go 1.23 as the new minimum supported version. Additionally, the `scriggo` command is now compiled using Go 1.24. Co-authored-by: Gianluca Mondini <mondini@open2b.com>
internal/compiler: fix emitting of receiver in method calls This commit fixes the emitting of method calls, where the receiver of the method call was erroneously placed as first "general" argument in the call stack, causing an incorrect stack shift and altering the parameters received from the called method. Also adds tests on this. Fix #967. Co-authored-by: Marco Gazerro <gazerro@open2b.com>
cmd/scriggo: add LiveReload for automatic page reloads This change adds LiveReload functionality, enabling automatic page reloads in the browser whenever the template code changes. The 'scriggo serve' command now injects JavaScript into the generated page. Using Server-Side Events (SSE), it triggers a page reload whenever the page’s template files change. LiveReload can be disabled with the --disable-livereload flag.
all: use the syntax `//go:build` instead of `// +build` This commit removes the line syntax: // +build by using just the syntax: //go:build which is supported starting from Go 1.17 and has been considered deprecated starting from Go 1.18. Note that, in tests, the old syntax is kept. See #956.
PreviousNext