Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to import external package #5

Open
huaxk opened this issue Apr 7, 2024 · 1 comment
Open

How to import external package #5

huaxk opened this issue Apr 7, 2024 · 1 comment

Comments

@huaxk
Copy link

huaxk commented Apr 7, 2024

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 huaxk changed the title How to import other package How to import external package Apr 7, 2024
@arslanarm
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants