docs: Add more documentation
All checks were successful
Mirror Push / mirror (push) Successful in 6s
Test / test (stable) (push) Successful in 39s
Test / test (oldstable) (push) Successful in 56s

Add the "official" logo.
Also run golangci-lint

Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
Sam Therapy 2024-03-23 22:00:01 +01:00
parent 3881caff0d
commit 58cee5b3c9
Signed by: sam
GPG key ID: 4D8B07C18F31ACBD
8 changed files with 87 additions and 11 deletions

1
CODE_OF_CONDUCT.md Symbolic link
View file

@ -0,0 +1 @@
/dev/null

57
CONTRIBUTING.md Normal file
View file

@ -0,0 +1,57 @@
# Contributing to awl
First off, thank you! We appreciate your interest in wanting to contribute to awl.
> If you like the project, spread the word! Help us grow by sharing the project with anyone you thing might be interested. Here are some ways you can help:
>
> - Star the project on GitHub
> - Share the project on social media
> - Tell your friends about the project
## How to contribute
If you want to contribute to awl, you can do so by:
- [Reporting a bug](#reporting-a-bug)
- [Requesting a feature](#requesting-a-feature)
- [Submitting a pull request](#submitting-a-pull-request)
### Reporting a bug
If you find a bug in awl, please [open an issue](https://git.froth.zone/sam/awl/issues) on the project's issue tracker. When reporting a bug, please include as much information as possible, such as:
- The version of awl you are using
- The operating system you are using
- The steps to reproduce the bug
- Any error messages you received
### Requesting a feature
If you have an idea for a feature you would like to see in awl, please [open an issue](https://git.froth.zone/sam/awl/issues) on the project's issue tracker. When requesting a feature, please include as much information as possible, such as:
- A description of the feature
- Why you think the feature would be useful
- Any other relevant information
### Submitting a pull request
If you would like to contribute code to awl, you can do so by submitting a pull request. To submit a pull request, follow these steps:
1. Fork the project on Git
2. Create a new branch for your changes
3. Make your changes
4. Push your changes to your fork
5. [Open a pull request](https://git.froth.zone/sam/awl/pulls) on the project's Git repository
When submitting a pull request, please include as much information as possible, such as:
- A description of the changes you made
- Why you made the changes
- Any other relevant information
Alternatively, you can also contribute by sending an email to the project's [mailing list](https://lists.sr.ht/~sammefishe/awl-devel). For more information about using Git over email, refer to [git-send-email.io](https://git-send-email.io/)
#### Code Style
Before submitting a pull request, please run `make lint` to ensure your code adheres to the project's code style.
Make sure that you have `golangci-lint` installed, that is our linter of choice.

View file

@ -1,17 +1,15 @@
# <img src="./doc/awl-text.png" width="50%" title="awl logo" alt="awl">
<!-- markdownlint-disable MD033 -->
# <img src="./doc/img/awl-text.png" width="50%" title="awl logo" alt="awl">
> awl *(noun)*: A pointed tool for making small holes in wood or leather
A command-line DNS lookup tool that supports DNS queries over UDP, TCP, TLS, HTTPS, DNSCrypt, and QUIC.
[![Gitea Release](https://img.shields.io/gitea/v/release/sam/awl?gitea_url=https%3A%2F%2Fgit.froth.zone&display_name=release&style=for-the-badge)](https://git.froth.zone/sam/awl)
[![Last Commit](https://img.shields.io/gitea/last-commit/sam/awl?gitea_url=https%3A%2F%2Fgit.froth.zone&style=for-the-badge)](https://git.froth.zone/sam/awl/commits/branch/master)
[![Go Report](https://goreportcard.com/badge/dns.froth.zone/awl?style=for-the-badge)](https://goreportcard.com/report/dns.froth.zone/awl)
[![License](https://img.shields.io/github/license/samtherapy/awl?style=for-the-badge)](https://spdx.org/licenses/BSD-3-Clause.html)
Awl is designed to be a drop-in replacement for [dig](https://bind9.readthedocs.io/en/v9_18_3/manpages.html#dig-dns-lookup-utility).
## Examples
@ -20,8 +18,8 @@ Awl is designed to be a drop-in replacement for [dig](https://bind9.readthedocs.
# Query a domain over UDP
awl example.com
# Query a domain over TCP
awl example.com
# Query a domain over HTTPS, print only the results
awl example.com +https --short
# Query a domain over TLS, print as JSON
awl example.com +tls +json
@ -63,6 +61,7 @@ apk add awl-dns
<summary>Arch</summary>
AUR package available as [awl-dns-git](https://aur.archlinux.org/packages/awl-dns-git/)
```shell
yay -S awl-dns-git ||
paru -S awl-dns-git
@ -138,6 +137,7 @@ brew install SamTherapy/tap/awl
```shell
brew install SamTherapy/tap/awl
```
</details>
</details>
<br />
@ -152,11 +152,27 @@ brew install SamTherapy/tap/awl
scoop bucket add froth https://git.froth.zone/packages/scoop.git
scoop install awl
```
</details>
</details>
## Contributing
Please see the [CONTRIBUTING.md](./CONTRIBUTING.md) file for more information.
TL;DR: If you like the project, spread the word! If you want to contribute, [use the issue tracker](https://git.froth.zone/sam/awl/issues) or [open a pull request](https://git.froth.zone/sam/awl/pulls).
Want to use email instead? Use our [mailing list](https://lists.sr.ht/~sammefishe/awl-devel)!
### Mirrors
The canonical repository is located on [my personal Forgejo instance](https://git.froth.zone/sam/awl). \
Official mirrors are located on [GitHub](https://github.com/SamTherapy/awl) and [SourceHut](https://sr.ht/~sammefishe/awl/).
Contributions are accepted on all mirrors, but the Forgejo instance is preferred.
## License
[BSD-3-Clause](https://spdx.org/licenses/BSD-3-Clause.html)
### Credits
- Awl image taken from [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Awl.tif), imaged is licensed CC0.

View file

@ -83,7 +83,6 @@ func ParseMiscArgs(args []string, opts *util.Options) error {
opts.Logger.Info(arg, "detected as a domain name")
opts.Request.Name, err = idna.ToASCII(arg)
if err != nil {
return fmt.Errorf("unicode to punycode: %w", err)
}
@ -99,7 +98,6 @@ func ParseMiscArgs(args []string, opts *util.Options) error {
opts.Logger.Info(arg, "is unknown. Assuming domain")
opts.Request.Name, err = idna.ToASCII(arg)
if err != nil {
return fmt.Errorf("unicode to punycode: %w", err)
}

View file

Before

Width:  |  Height:  |  Size: 195 KiB

After

Width:  |  Height:  |  Size: 195 KiB

1
doc/img/awl.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 505 KiB

View file

@ -62,7 +62,6 @@ func (resolver *StandardResolver) LookUp(msg *dns.Msg) (resp util.Response, err
msg.Extra = resp.DNS.Extra
resp.DNS, resp.RTT, err = dnsClient.Exchange(msg, resolver.opts.Request.Server)
if err != nil {
return resp, fmt.Errorf("badcookie: DNS exchange: %w", err)
}

View file

@ -2,12 +2,16 @@
# why not?
name: awl
base: core20
base: bare
adopt-info: awl
license: BSD-3-Clause
summary: A command-line DNS query tool.
description: |
awl is a command line DNS tool, much like dig and drill.
icon: doc/img/awl.svg
issues:
- https://git.froth.zone/sam/awl/issues
- ~sammefishe/awl-devel@lists.sr.ht
grade: devel
confinement: strict
@ -38,4 +42,4 @@ apps:
command: bin/awl
completer: share/bash-completion/completions/awl
plugs:
- network
- network