You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Docs say that fields are read-only, which means following fields should be unexported:
Exec ExecModule
Open OpenModule
// And arguably these too.
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
There is interesting case with exec 2>/some/file though, which I don't know how should be handled and exposed yet.
I would also consider actually unexporting all fields and replacing them with runner.State() *interp.RunnerState method. This makes api intent slightly clearer at the cost of adding new struct type, but I'm not sure whether such change is useful or not.
I think this is my last itch with current api, there are other problems, but they don't touch public api and can be fixed later.
The text was updated successfully, but these errors were encountered:
Docs say that fields are read-only, which means following fields should be unexported:
There is interesting case with
exec 2>/some/file
though, which I don't know how should be handled and exposed yet.I would also consider actually unexporting all fields and replacing them with
runner.State() *interp.RunnerState
method. This makes api intent slightly clearer at the cost of adding new struct type, but I'm not sure whether such change is useful or not.I think this is my last itch with current api, there are other problems, but they don't touch public api and can be fixed later.
The text was updated successfully, but these errors were encountered: