borgo icon indicating copy to clipboard operation
borgo copied to clipboard

How to import external package

Open huaxk opened this issue 10 months ago • 1 comments

borgo's importer tool can import go std package and user's package, but how to impot other external package: in golang i can:

import "github.com/go-chi/chi/v5"

the corresponding usage in borgo:

use "github.com/go-chi/chi/v5"

or

use github.com/go-chi/chi/v5

neither works, how to import other package using borgo's importer tool, and how to use?

huaxk avatar Apr 07 '24 05:04 huaxk

I am currently trying to add more definitions of std packages that are not included in the std directory. I found out that for standard library, borgo uses std/modules.json file to map the use some-package.sub-package to (i assume) the internal directory structure that matches the package in go (e.g import "some-package/sub-package").

I feel like this is a hacky way to do the thing I want to do. Hope it helps

arslanarm avatar May 02 '24 14:05 arslanarm