-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add copy command #49
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
Conversation
|
blarg, |
|
other options look equally bad. this will work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new copy subcommand for copying logs to the clipboard and updates the environment/tooling to Go 1.24.
- Adds a
copyCLI command using thegolang.design/x/clipboardpackage - Bumps Go versions across
go.mod,shell.nix, and CI workflows to 1.24 and installs necessary system deps - Refactors task definitions in
tasks.tomland updates the README with Linux build notes
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tasks.toml | Flattened multi-line cmds arrays and added a new:command task |
| shell.nix | Updated Go to 1.24, added nativeBuildInputs and X11 in buildInputs |
| go.mod | Upgraded Go to 1.24, added golang.design/x/clipboard dependency |
| cmd/copy.go | Implemented the new copy command |
| README.md | Revised source install section and noted X11 header requirement |
| .github/workflows/test.yml | Updated Go version, installed X11 headers |
| .github/workflows/release.yml | Updated Go version, installed X11 headers |
Comments suppressed due to low confidence (4)
cmd/copy.go:36
- [nitpick] The function name "copy" shadows the built-in Go function and is ambiguous; consider renaming it to "copyToClipboard" for clarity.
func copy(content []byte) error {
.github/workflows/test.yml:15
- The CI step installs only X11 headers but misses required build tools (gcc and pkg-config) needed for the clipboard dependency; add them to the apt-get install command.
- run: sudo apt-get install libx11-dev
.github/workflows/release.yml:23
- Similar to the test workflow, this step should also install gcc and pkg-config alongside libx11-dev to ensure successful builds with the clipboard package.
- run: sudo apt-get install libx11-dev
go.mod:41
- [nitpick] This indirect dependency appears to be pulled in transitively; consider removing explicit require lines for indirect modules and letting 'go mod tidy' handle them.
golang.org/x/exp/shiny v0.0.0-20250606033433-dcc06ee1d476 // indirect
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
adds a
copysubcommand that copies the specified log to the clipboard.supports all the same log selection stuff.
daylog copycopies today's log,similarly, logs from past/future work too,
daylog copy -- tomorrow,closes #48
also bumps go to 1.24