On Monday, November 25, 2019 at 9:55:55 AM UTC-7, Daniel Norte Moraes wrote: > > I Want create and permite my users to create go lang programs mostly > with full capabilities from > golang itself, but with some direct capabilities as net and filesystem > striped from direct accesss; mostly > capabilities as database access, and network access will be encapsuled in > ours third parthy golang libs :-) > The intent is use golang as a full-fledge compiled language and as > substitute for a need a custom scripted language. >
I do something much like that for my Go Server Pages <https://gosp.pakin.org/> project, which lets one embed Go code in a Web page à la PHP. The Web server administrator can choose which packages are allowed to be imported, with the default being only the provided gosp package <https://godoc.org/github.com/spakin/gosp/src/gosp>, which encapsulates a few functions from some of the standard packages. Check out the gosp2go source directory <https://github.com/spakin/gosp/tree/master/src/gosp2go> and in particular the ValidateImports method in utils.go <https://github.com/spakin/gosp/blob/39c37251e1914ad23ad16f5c9e458bc90eddf08a/src/gosp2go/utils.go#L64> . — Scott -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/d6b3f18b-7abf-4a4f-94fc-02475bd43088%40googlegroups.com.