Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
July 28, 2016 Import from github | ||||
---|---|---|---|---|
| ||||
Hello everyone, can i do in D something like this: import "github.com/julienschmidt/httprouter" like in Golang? |
July 28, 2016 Re: Import from github | ||||
---|---|---|---|---|
| ||||
Posted in reply to eugene | On Thursday, 28 July 2016 at 13:31:59 UTC, eugene wrote:
> Hello everyone,
> can i do in D something like this:
> import "github.com/julienschmidt/httprouter"
> like in Golang?
No, but many D libraries you find on github are registered on DUB, so you can use it to manage your dependencies (if that library is not registered on DUB, ask its maintainer to register it, as it's the best way to manage your dependencies in D).
|
July 28, 2016 Re: Import from github | ||||
---|---|---|---|---|
| ||||
Posted in reply to Lodovico Giaretta | On Thursday, 28 July 2016 at 13:39:43 UTC, Lodovico Giaretta wrote: > On Thursday, 28 July 2016 at 13:31:59 UTC, eugene wrote: >> Hello everyone, >> can i do in D something like this: >> import "github.com/julienschmidt/httprouter" >> like in Golang? > > No, but many D libraries you find on github are registered on DUB, so you can use it to manage your dependencies (if that library is not registered on DUB, ask its maintainer to register it, as it's the best way to manage your dependencies in D) You might also subscribe to this thread: https://github.com/dlang/dub/issues/50 |
August 01, 2016 Re: Import from github | ||||
---|---|---|---|---|
| ||||
Posted in reply to eugene | On Thursday, 28 July 2016 at 13:31:59 UTC, eugene wrote: > Hello everyone, > can i do in D something like this: > import "github.com/julienschmidt/httprouter" > like in Golang? Yes, latest version of DUB just added support for this via a special comment syntax that describes dependencies on DUB-packages. For details on this syntax see: http://forum.dlang.org/thread/nk93ge$1jhe$1@digitalmars.com?page=1 |
August 02, 2016 Re: Import from github | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nordlöw | On 2016-08-01 11:51, Nordlöw wrote: > Yes, latest version of DUB just added support for this via a special > comment syntax that describes dependencies on DUB-packages. > > For details on this syntax see: > http://forum.dlang.org/thread/nk93ge$1jhe$1@digitalmars.com?page=1 Unless the question is if it's possible to import/use a package directly from GitHub, then the answer is no. -- /Jacob Carlborg |
Copyright © 1999-2021 by the D Language Foundation