From c9f206c9aa9a3fe654071786f1c26c2aadc434a5 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Mon, 28 Aug 2023 23:47:23 +0000 Subject: [PATCH] Unmarshal: WIP Signed-off-by: Alejandro Mery --- unmarshal.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 unmarshal.go diff --git a/unmarshal.go b/unmarshal.go new file mode 100644 index 0000000..bf4cca8 --- /dev/null +++ b/unmarshal.go @@ -0,0 +1,15 @@ +package ini + +import "io" + +// ReadInto ... +func ReadInto(v any, r io.Reader) error { + dec := NewDecoder(r) + + return dec.Unmarshal(v) +} + +// Unmarshal ... +func (dec *Decoder) Unmarshal(any) error { + return dec.p.Run() +}