aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md13
-rw-r--r--human.go1
2 files changed, 14 insertions, 0 deletions
diff --git a/README.md b/README.md
index 03b197d..e4421bc 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,14 @@
# go-human.json
+
+Simple implementation of [`human.json`](https://codeberg.org/robida/human.json) in Go.
+
+## Usage
+
+Install with:
+```bash
+go get -u git.anhgelus.world/anhgelus/go-human.json
+```
+
+Type `Human` represents the JSON file.
+
+You can get the URL of the `human.json` referenced by a link tag with `GetURLFromHTML`.
diff --git a/human.go b/human.go
index e2ac134..796d970 100644
--- a/human.go
+++ b/human.go
@@ -23,6 +23,7 @@ var (
// URL represents a standard [url.URL] following normalization rules of human.json.
type URL url.URL
+// NewURL creates a new [URL].
func NewURL(s string) (*URL, error) {
raw, err := url.Parse(s)
if err != nil {