Thread overview
Import from github
Jul 28, 2016
eugene
Jul 28, 2016
Lodovico Giaretta
Jul 28, 2016
Seb
Aug 01, 2016
Nordlöw
Aug 02, 2016
Jacob Carlborg
July 28, 2016
Hello everyone,
can i do in D something like this:
import "github.com/julienschmidt/httprouter"
like in Golang?
July 28, 2016
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
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
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
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