On Mon, 26 Nov 2018 07:07:34 -0800 (PST) clementauger...@gmail.com wrote: > HI, > > I m looking for a reliable way to determine if a package path string > belongs to the stdlib or not. > > It happens at runtime, the program can not access its sources. > > I m thinking to write package that stores those information into > package variables, into a map[go version][]packagesPaths. > > Do you have any suggestions to achieve that ? > > I digged into go/types, loader etc but i did find the desired api. > > Thanks! >
Here is a function to get list of packages under $GOROOT/src. [1] [1] https://github.com/shuLhan/beku/blob/master/env.go#L398 -- { "github":"github.com/shuLhan", "site":"kilabit.info" } -- 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. For more options, visit https://groups.google.com/d/optout.