campoy / embedmd

embedmd: embed code into markdown and keep everything in sync
Apache License 2.0
767 stars 62 forks source link

extracting the main functionality into a resuable lib #28

Closed campoy closed 7 years ago

campoy commented 7 years ago

Fixes #10.

campoy commented 7 years ago

Hey @shurcooL, I think you might like this.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+3.8%) to 78.641% when pulling 7e3080602f24bb83fcd0ce194538f1e1cedb7cfc on lib into c005cb67a74ca57cf27d2db719c3e244cb440548 on master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 74.825% when pulling 3bf2ea31f80545e46e3eb3579ca015dc7d8f9930 on lib into c005cb67a74ca57cf27d2db719c3e244cb440548 on master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+3.8%) to 78.641% when pulling 9cab4535ee4bc92a916f6cc5e300060b61d6439b on lib into c005cb67a74ca57cf27d2db719c3e244cb440548 on master.

dmitshur commented 7 years ago

A high level comment for you to consider (but not necessarily do) is to keep the library at github.com/campoy/embedmd import path, and move the command to github.com/campoy/embedmd/cmd/embedmd.

The cmd/foo pattern is pretty common and I think it's nice. It lets you avoid the stuttering in github.com/campoy/embedmd/embedmd import path, and makes it more more visible where the command/libraries are. But it's definitely a matter of taste, so completely up to you.

Some examples of the pattern:

campoy commented 7 years ago

I personally care more about having the command install with "go get github.com/campoy/embedmd" :-)