summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorAlex Flint <[email protected]>2021-08-20 19:52:48 -0700
committerAlex Flint <[email protected]>2021-08-20 19:52:48 -0700
commit3d59e5e89e775b1d33a451aca6aa4bda4fbad500 (patch)
tree71788f3ee1badc138e0f243e15257cf9d2e7c663 /README.md
parenteb0393e9bc0bbd8d3cc37a6ee98c1d538e4e5c91 (diff)
bump go-scalar to v1.1 and add documentation about supported types
Diffstat (limited to 'README.md')
-rw-r--r--README.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/README.md b/README.md
index 48fa2f0..229a9df 100644
--- a/README.md
+++ b/README.md
@@ -308,6 +308,22 @@ func main() {
As usual, any field tagged with `arg:"-"` is ignored.
+### Supported types
+
+The following types may be used as arguments:
+- built-in integer types: `int, int8, int16, int32, int64, byte, rune`
+- built-in floating point types: `float32, float64`
+- strings
+- booleans
+- URLs represented as `url.URL`
+- time durations represented as `time.Duration`
+- email addresses represented as `mail.Address`
+- MAC addresses represented as `net.HardwareAddr`
+- pointers to any of the above
+- slices of any of the above
+- maps using any of the above as keys and values
+- any type that implements `encoding.TextUnmarshaler`
+
### Custom parsing
Implement `encoding.TextUnmarshaler` to define your own parsing logic.