| Age | Commit message (Collapse) | Author |
|
With help of spdxconv tool [1], we able to bulk update all files license
and copyright format to comply with SPDX formats.
[1] https://kilabit.info/project/spdxconv/
|
|
Any request to Run or Test Go code that requires writing new
files will be joined with the [GoOptions.Root] first.
If the final absolute path does not have Root as the prefix
it will return an error [os.ErrPermission].
|
|
This changes remove the field pid in the struct command that wait for
process ID, instead execute cmd with Run directly.
In the Run function, use the UnsafeRun to store temporary directory
and move the statements that writes go.mod and main.go into the method
writes of Request.
This remove unnecessary unsafeRun function.
|
|
The Test and HTTPHandleTest functions accept Request with File and Body
fields.
|
|
As exceptional, the Run and HTTPHandleRun accept the following
request for running program inside custom "go.mod",
{
"unsafe_run": <path>
}
The "unsafe_run" define the path to directory relative to HTTP
server working directory.
Once request accepted it will change the directory into
"unsafe_run" first and then run "go run ." directly.
Go code that executed inside "unsafe_run" should be not
modifiable and safe from mallicious execution.
|
|
The idea is to allow testing Go code on specific Go version.
For example, before Go 1.22, the for loop with variable is shared
among block statements, which cause every use of that variable is run
with the last value.
|
|
Package play provides callable APIs and HTTP handlers to format and run
Go code, similar to Go playground, but using HTTP instead of WebSocket.
|