Skip to content

Commit 239ba3a

Browse files
committed
Document the :added metadata
1 parent fd5e731 commit 239ba3a

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

README.adoc

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1920,7 +1920,26 @@ was deprecated in case of versioned software (e.g. a library) or simply
19201920
----
19211921

19221922
TIP: If you're into SemVer, it's a good idea to omit the patch version.
1923-
This means you should use `0.5` instead of `0.5.0`.
1923+
This means you should use `0.5` instead of `0.5.0`. This applies
1924+
for all metadata data that's version related.
1925+
1926+
=== `:added`
1927+
1928+
The most common way to document when a public API was added to a
1929+
library is via the `:added` metadata.
1930+
1931+
[source,clojure]
1932+
----
1933+
(def ^{:added "0.5"} foo
1934+
42)
1935+
1936+
(ns foo.bar
1937+
"A very useful ns."
1938+
{:added "0.8"})
1939+
1940+
(defn ^{:added "0.5"} foo
1941+
(bar))
1942+
----
19241943

19251944
== Comments
19261945

0 commit comments

Comments
 (0)