Skip to content
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

Display full url in messages #10

Merged
merged 3 commits into from
Oct 31, 2024
Merged

Conversation

KenyC
Copy link
Contributor

@KenyC KenyC commented Oct 31, 2024

When wd-41 starts, the following is displayed:

2024-10-30T21:12:23Z ok: now serving directory: '/root/wd-41' on port: '8080', mirror dir is: '/tmp/wd-41_1660140152', tls: false, certPath: '', keyPath: ''

Since my terminal emulator recognizes URL (as I suspect quite a few do), it'd be much more useful for me to have a fuil URL displayed here than I can click on. So this PR replaces the former greeting message with:

2024-10-30T21:16:18Z ok: Server started successfully:
2024-10-30T21:16:18Z ok: - URL: http://localhost:8080
2024-10-30T21:16:18Z ok: - Serving directory: '/root/wd-41'
2024-10-30T21:16:18Z ok: - Mirror directory: '/tmp/wd-41_4088355689'
2024-10-30T21:16:18Z ok: - TLS disabled

I'm happy to have something else appear as long as http://localhost:8080 is somewhere to be found in the output.

Thanks for the useful tool at any rate!

Copy link
Owner

@baalimago baalimago left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a good idea, thanks for the contribution!

cmd/serve/serve.go Outdated Show resolved Hide resolved
@KenyC
Copy link
Contributor Author

KenyC commented Oct 31, 2024

Ah glad it helps! I've corrected the stupid "if" clause

@baalimago
Copy link
Owner

baalimago commented Oct 31, 2024

Silly gofumpt being upset over two newlines. I'll fix that post-merge. Thanks for your contribution!

@baalimago baalimago merged commit a664d41 into baalimago:main Oct 31, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants