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 y
On Mon, Nov 26, 2018 at 4:07 PM wrote:
> I m looking for a reliable way to determine if a package path string
belongs to the stdlib or not.
Check that the package path is bellow runtime.GOROOT().
--
-j
--
You received this message because you are subscribed to the Google Groups
"golang-nuts
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 sto
Hi,
I was not referring to the file system path, i m referring to the import
package path.
Given the string bytes, reliably tells this is a package that belongs to
the stdlib of version Y.
I m using the reflect.Type.PkgPath value, to be more specific.
Le lundi 26 novembre 2018 16:11:40 UTC+1,
thanks! It will be useful, indeed.
Le lundi 26 novembre 2018 16:15:51 UTC+1, Shulhan a écrit :
>
> On Mon, 26 Nov 2018 07:07:34 -0800 (PST)
> clement...@gmail.com wrote:
>
> > HI,
> >
> > I m looking for a reliable way to determine if a package path string
> > belongs to the stdlib or not.
On Mon, Nov 26, 2018 at 4:55 PM wrote:
> I was not referring to the file system path, i m referring to the import
package path.
FTR: The later is canonically called just "the import path".
--
-j
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" grou
On Mon, Nov 26, 2018 at 7:07 AM wrote:
>
> 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
> variab
thanks Ian, i had it done this way
https://github.com/clementauger/stdlist/blob/master/raw.go
Le lundi 26 novembre 2018 21:06:24 UTC+1, Ian Lance Taylor a écrit :
>
> On Mon, Nov 26, 2018 at 7:07 AM >
> wrote:
> >
> > I m looking for a reliable way to determine if a package path string
> belo