Use as go package #373
Replies: 6 comments
-
|
Glad to hear that you enjoy klog. I created this branch to see what needs changing to make your suggestion happen. You can try it by running I cannot think of any technical issues when renaming the package. Actually, I suppose your suggestion is more common practice and in line with the “standard” of go modules. My concern is more about usage: this repo is primarily meant for building the CLI tool, and not for being used as standalone source code library. The reason is that I don’t want to go down the road of creating proper API documentation, making compatibility guarantees, or providing code-level support. That’d be a bit too much for a spare time project, unfortunately. So, as long as it’s clear that people are “on their own” when using the sources directly, I’m happy to make that process more convenient. I still need to think some more about this before merging, but I’m generally positive (with the above caveat, though). I’d also need to add a sentence or two to the README then. |
Beta Was this translation helpful? Give feedback.
-
|
Sorry it took me so long to get back to this. But, it worked!!
Totally understand! I think a few lines to the README wouldn't be out of line. I was (and still am) proceeding with the understanding that I was peering under the hood and to proceed at my own risk. The one small thing I wanted from klog that started me down this path was fractional hours of the entry durations. E.g. Once I started looking into the code, I noticed how you had things nicely decoupled and the parser was separate. Seeing that it was one method call, Looking at the branch, the change is mostly to import paths. Not too too bad. Anyway, thank you so so much!! I'm super stoked about this! Let me know if I can help in any way. |
Beta Was this translation helpful? Give feedback.
-
|
Awesome, thanks for confirming! I’ll wrap up the branch probably next week or so. Just for the records: there is also the |
Beta Was this translation helpful? Give feedback.
-
|
Oh man. How did I miss |
Beta Was this translation helpful? Give feedback.
-
|
Done – thanks @codegoalie for the idea! Just for future reference: keep in mind to always pin the commit hash, as there won’t be separate releases of the source code. E.g.: go get github.com/jotaen/klog@07ba740(This would pull the klog source code at commit 07ba740. If you omit the commit hash, then it falls back to the latest commit, which might break your code at some point in the future.) |
Beta Was this translation helpful? Give feedback.
-
|
Amazing! Thank you so so much! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
First off, thanks so much for creating klog! I've been using it for a while now just to track my work time. It's so great to have something easy and predictable that doesn't need a network connection!
I recently started doing some consulting work and want to programatically convert by klog entries into an invoice. I would lke to import some of the parsing features into an existing go program. However, it seems by declaring the base package as just
klog, the go tooling can't find the code to download it. It seems changing togithub.com/jotaen/klogwould work. Is that a reasonable change? Would that cause more problems than it's worth? Thanks!Beta Was this translation helpful? Give feedback.
All reactions